org.xwiki.velocity.introspection
Class DeprecatedCheckUberspector

java.lang.Object
  extended by org.apache.velocity.util.introspection.UberspectImpl
      extended by org.xwiki.velocity.introspection.AbstractChainableUberspector
          extended by org.xwiki.velocity.introspection.DeprecatedCheckUberspector
All Implemented Interfaces:
org.apache.velocity.util.introspection.Uberspect, org.apache.velocity.util.introspection.UberspectLoggable, ChainableUberspector

public class DeprecatedCheckUberspector
extends AbstractChainableUberspector
implements org.apache.velocity.util.introspection.Uberspect, ChainableUberspector, org.apache.velocity.util.introspection.UberspectLoggable

Chainable Velocity 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.

Since:
1.5M1
Version:
$Id: edee03185acdae95472e191f282f66b9eb3b6c6d $
See Also:
ChainableUberspector

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.velocity.util.introspection.UberspectImpl
org.apache.velocity.util.introspection.UberspectImpl.VelGetterImpl, org.apache.velocity.util.introspection.UberspectImpl.VelMethodImpl, org.apache.velocity.util.introspection.UberspectImpl.VelSetterImpl
 
Field Summary
 
Fields inherited from class org.xwiki.velocity.introspection.AbstractChainableUberspector
inner
 
Fields inherited from class org.apache.velocity.util.introspection.UberspectImpl
introspector, log
 
Constructor Summary
DeprecatedCheckUberspector()
           
 
Method Summary
 org.apache.velocity.util.introspection.VelMethod getMethod(Object obj, String methodName, Object[] args, org.apache.velocity.util.introspection.Info i)
           
 org.apache.velocity.util.introspection.VelPropertyGet getPropertyGet(Object obj, String identifier, org.apache.velocity.util.introspection.Info i)
           
 org.apache.velocity.util.introspection.VelPropertySet getPropertySet(Object obj, String identifier, Object arg, org.apache.velocity.util.introspection.Info i)
           
 void init()
           
 
Methods inherited from class org.xwiki.velocity.introspection.AbstractChainableUberspector
getIterator, wrap
 
Methods inherited from class org.apache.velocity.util.introspection.UberspectImpl
setLog, setRuntimeLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xwiki.velocity.introspection.ChainableUberspector
wrap
 
Methods inherited from interface org.apache.velocity.util.introspection.Uberspect
getIterator
 
Methods inherited from interface org.apache.velocity.util.introspection.UberspectLoggable
setLog, setRuntimeLogger
 

Constructor Detail

DeprecatedCheckUberspector

public DeprecatedCheckUberspector()
Method Detail

init

public void init()
Specified by:
init in interface org.apache.velocity.util.introspection.Uberspect
Overrides:
init in class AbstractChainableUberspector

getMethod

public org.apache.velocity.util.introspection.VelMethod getMethod(Object obj,
                                                                  String methodName,
                                                                  Object[] args,
                                                                  org.apache.velocity.util.introspection.Info i)
                                                           throws Exception
Specified by:
getMethod in interface org.apache.velocity.util.introspection.Uberspect
Overrides:
getMethod in class AbstractChainableUberspector
Throws:
Exception

getPropertyGet

public org.apache.velocity.util.introspection.VelPropertyGet getPropertyGet(Object obj,
                                                                            String identifier,
                                                                            org.apache.velocity.util.introspection.Info i)
                                                                     throws Exception
Specified by:
getPropertyGet in interface org.apache.velocity.util.introspection.Uberspect
Overrides:
getPropertyGet in class AbstractChainableUberspector
Throws:
Exception

getPropertySet

public org.apache.velocity.util.introspection.VelPropertySet getPropertySet(Object obj,
                                                                            String identifier,
                                                                            Object arg,
                                                                            org.apache.velocity.util.introspection.Info i)
                                                                     throws Exception
Specified by:
getPropertySet in interface org.apache.velocity.util.introspection.Uberspect
Overrides:
getPropertySet in class AbstractChainableUberspector
Throws:
Exception


Copyright © 2004-2013 XWiki. All Rights Reserved.