if (!executor.isAlive()) { executor = new BooleanPropertyExecutor(log, introspector, claz, identifier); if (!executor.isAlive()) { executor = new MapGetExecutor(log, claz, identifier); if (!executor.isAlive()) { executor = new GetExecutor(log, introspector, claz, identifier); return executor.isAlive() ? new VelGetterImpl(executor) : null;
/** * @see org.apache.velocity.util.introspection.VelPropertyGet#invoke(java.lang.Object) */ public Object invoke(Object o) throws Exception { return getExecutor.execute(o); }
public String getMethodName() { return ae.getMethod().getName(); } }
public String getMethodName() { return ae.getMethod().getName(); }
if (!executor.isAlive()) { executor = new BooleanPropertyExecutor(log, introspector, claz, identifier); if (!executor.isAlive()) { executor = new MapGetExecutor(log, claz, identifier); if (!executor.isAlive()) { executor = new GetExecutor(log, introspector, claz, identifier); return executor.isAlive() ? new VelGetterImpl(executor) : null;
public Object invoke(Object o) throws Exception { return ae.execute(o); }
if (!executor.isAlive()) { executor = new BooleanPropertyExecutor(log, introspector, claz, identifier); if (!executor.isAlive()) { executor = new MapGetExecutor(log, claz, identifier); if (!executor.isAlive()) { executor = new GetExecutor(log, introspector, claz, identifier); return executor.isAlive() ? new VelGetterImpl(executor) : null;
/** * @see org.apache.velocity.util.introspection.VelPropertyGet#invoke(java.lang.Object) */ public Object invoke(Object o) throws IllegalAccessException, InvocationTargetException { return getExecutor.execute(o); }
public Object invoke(Object o) throws Exception { return ae.execute(o); } public boolean isCacheable()
/** * @see org.apache.velocity.util.introspection.VelPropertyGet#invoke(java.lang.Object) */ public Object invoke(Object o) throws Exception { return getExecutor.execute(o); }
/** * Property getter */ public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i) throws Exception { AbstractExecutor executor; Class claz = obj.getClass(); /* * first try for a getFoo() type of property * (also getfoo() ) */ executor = new PropertyExecutor(rlog,introspector, claz, identifier); /* * if that didn't work, look for get("foo") */ if (executor.isAlive() == false) { executor = new GetExecutor(rlog, introspector, claz, identifier); } /* * finally, look for boolean isFoo() */ if( executor.isAlive() == false) { executor = new BooleanPropertyExecutor(rlog, introspector, claz, identifier); } return (executor != null) ? new VelGetterImpl(executor) : null; }
/***********************************************************************/ public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i) throws Exception { AbstractExecutor executor; if (obj == null) { throw new VelocityParsingError("tried " + getPropertyText("null", identifier), i); } Class<? extends Object> claz = obj.getClass(); // trying getFoo() executor = new PropertyExecutor(log, introspectorWithLog, claz, identifier); if (!executor.isAlive()) { // trying get("foo") executor = new GetExecutor(log, introspectorWithLog, claz, identifier); } if (!executor.isAlive()) { // trying isFoo() executor = new BooleanPropertyExecutor(log, introspectorWithLog, claz, identifier); } if (!executor.isAlive()) { throw new VelocityParsingError( "Did not find " + getPropertyText(obj.getClass().getName(), identifier), i); } return new VelGetterImpl(executor); } /***********************************************************************/