Class DeprecatedCheckUberspector
- java.lang.Object
-
- org.apache.velocity.util.introspection.UberspectImpl
-
- org.apache.velocity.util.introspection.AbstractChainableUberspector
-
- org.apache.velocity.util.introspection.DeprecatedCheckUberspector
-
- All Implemented Interfaces:
ChainableUberspector
,Uberspect
,RuntimeServicesAware
public class DeprecatedCheckUberspector extends AbstractChainableUberspector implements Uberspect
Chainable Uberspector that checks for deprecated method calls. It does that by checking if the returned method has a Deprecated annotation. Because this is a chainable uberspector, it has to re-get the method using a default introspector, which is not safe; future uberspectors might not be able to return a precise method name, or a method of the original target object. Borrowed from the XWiki project.- Since:
- 2.0
- Version:
- $Id:$
- See Also:
ChainableUberspector
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.velocity.util.introspection.UberspectImpl
UberspectImpl.VelGetterImpl, UberspectImpl.VelMethodImpl, UberspectImpl.VelSetterImpl
-
-
Field Summary
-
Fields inherited from class org.apache.velocity.util.introspection.AbstractChainableUberspector
inner
-
Fields inherited from class org.apache.velocity.util.introspection.UberspectImpl
conversionHandler, introspector, log, rsvc
-
-
Constructor Summary
Constructors Constructor Description DeprecatedCheckUberspector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VelMethod
getMethod(Object obj, String methodName, Object[] args, Info i)
MethodVelPropertyGet
getPropertyGet(Object obj, String identifier, Info i)
Property getterVelPropertySet
getPropertySet(Object obj, String identifier, Object arg, Info i)
Property settervoid
init()
init - the chainable uberspector is responsible for the initialization of the wrapped uberspector-
Methods inherited from class org.apache.velocity.util.introspection.AbstractChainableUberspector
getIterator, wrap
-
Methods inherited from class org.apache.velocity.util.introspection.UberspectImpl
getConversionHandler, setLog, setRuntimeServices
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.velocity.util.introspection.Uberspect
getIterator
-
-
-
-
Method Detail
-
init
public void init()
Description copied from class:AbstractChainableUberspector
init - the chainable uberspector is responsible for the initialization of the wrapped uberspector- Specified by:
init
in interfaceUberspect
- Overrides:
init
in classAbstractChainableUberspector
- See Also:
Uberspect.init()
-
getMethod
public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i)
Description copied from class:AbstractChainableUberspector
Method- Specified by:
getMethod
in interfaceUberspect
- Overrides:
getMethod
in classAbstractChainableUberspector
- Returns:
- A Velocity Method.
- See Also:
Uberspect.getMethod(java.lang.Object, java.lang.String, java.lang.Object[], org.apache.velocity.util.introspection.Info)
-
getPropertyGet
public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
Description copied from class:AbstractChainableUberspector
Property getter- Specified by:
getPropertyGet
in interfaceUberspect
- Overrides:
getPropertyGet
in classAbstractChainableUberspector
- Returns:
- A Velocity Getter Method.
- See Also:
Uberspect.getPropertyGet(java.lang.Object, java.lang.String, org.apache.velocity.util.introspection.Info)
-
getPropertySet
public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info i)
Description copied from class:AbstractChainableUberspector
Property setter- Specified by:
getPropertySet
in interfaceUberspect
- Overrides:
getPropertySet
in classAbstractChainableUberspector
- Returns:
- A Velocity Setter method.
- See Also:
Uberspect.getPropertySet(java.lang.Object, java.lang.String, java.lang.Object, org.apache.velocity.util.introspection.Info)
-
-