public String getMethodName() { return delegate.getMethodName(); } }
public Object invoke(Object o) throws Exception { final Object obj = delegate.invoke(o); if (obj == null) { return null; } return new AnnotatedValue<>(obj, annotations); }
public boolean isCacheable() { return delegate.isCacheable(); }
if (vg != null && vg.isCacheable()) return vg.invoke(o); return ec.methodException(o.getClass(), vg.getMethodName(), (Exception)ite.getTargetException()); "Invocation of method '" + vg.getMethodName() + "'" + " in " + o.getClass() + " threw exception " + ite.getTargetException().getClass() + " : " + ite.getTargetException().getMessage(), ite.getTargetException(), vg.getMethodName()); "Invocation of method '" + vg.getMethodName() + "'" + " in " + o.getClass() + " threw exception " + ite.getTargetException().getClass() + " : " + ite.getTargetException().getMessage(), ite.getTargetException(), vg.getMethodName());
if (vg != null && vg.isCacheable() && (o != null)) return vg.invoke(o); return EventHandlerUtil.methodException(rsvc, context, o.getClass(), vg.getMethodName(), (Exception) t, uberInfo); "Invocation of method '" + vg.getMethodName() + "'" + " in " + o.getClass() + " threw exception " + ite.getTargetException().toString(), ite.getTargetException(), vg.getMethodName(), getTemplateName(), this.getLine(), this.getColumn()); "Invocation of method '" + vg.getMethodName() + "'" + " in " + o.getClass() + " threw exception " + ite.getTargetException().toString(), ite.getTargetException(), vg.getMethodName(), getTemplateName(), this.getLine(), this.getColumn());
if (vg != null && vg.isCacheable() && (o != null)) return vg.invoke(o); return EventHandlerUtil.methodException(rsvc, context, o.getClass(), vg.getMethodName(), (Exception) t); "Invocation of method '" + vg.getMethodName() + "'" + " in " + o.getClass() + " threw exception " + ite.getTargetException().toString(), ite.getTargetException(), vg.getMethodName(), getTemplateName(), this.getLine(), this.getColumn()); "Invocation of method '" + vg.getMethodName() + "'" + " in " + o.getClass() + " threw exception " + ite.getTargetException().toString(), ite.getTargetException(), vg.getMethodName(), getTemplateName(), this.getLine(), this.getColumn());
@Override public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i) throws Exception { VelPropertyGet method = super.getPropertyGet(obj, identifier, i); if (method != null) { Method m = this.introspector.getMethod(obj.getClass(), method.getMethodName(), new Object[] {}); if (m != null && (m.isAnnotationPresent(Deprecated.class) || m.getDeclaringClass().isAnnotationPresent(Deprecated.class) || obj.getClass().isAnnotationPresent(Deprecated.class))) { logWarning("getter", obj, method.getMethodName(), i); } } return method; }
if (vg != null && vg.isCacheable() && (o != null)) return vg.invoke(o); return EventHandlerUtil.methodException(rsvc, context, o.getClass(), vg.getMethodName(), (Exception) t); "Invocation of method '" + vg.getMethodName() + "'" + " in " + o.getClass() + " threw exception " + ite.getTargetException().toString(), ite.getTargetException(), vg.getMethodName(), getTemplateName(), this.getLine(), this.getColumn()); "Invocation of method '" + vg.getMethodName() + "'" + " in " + o.getClass() + " threw exception " + ite.getTargetException().toString(), ite.getTargetException(), vg.getMethodName(), getTemplateName(), this.getLine(), this.getColumn());
@Override public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i) { VelPropertyGet method = super.getPropertyGet(obj, identifier, i); if (method != null) { Method m = this.introspector.getMethod(obj.getClass(), method.getMethodName(), new Object[] {}); if (m != null && (m.isAnnotationPresent(Deprecated.class) || m.getDeclaringClass().isAnnotationPresent(Deprecated.class) || obj.getClass().isAnnotationPresent(Deprecated.class))) { logWarning("getter", obj, method.getMethodName(), i); } } return method; }
/** * {@inheritDoc} * * @see Uberspect#getPropertyGet(java.lang.Object, java.lang.String, * org.apache.velocity.util.introspection.Info) */ @Override public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i) throws Exception { VelPropertyGet method = super.getPropertyGet(obj, identifier, i); if (method != null) { Method m = introspector.getMethod(obj.getClass(), method.getMethodName(), new Object[] {}); if (m != null && m.isAnnotationPresent(Deprecated.class)) { logWarning("getter", obj, method.getMethodName(), i); } } return method; }
getter.getMethodName(); return getter;
/** * Get a property getting strategy that will box the end result with any return value annotations on the property getter * * @param obj Object on which a property is being retrieved * @param identifier Property identifier * @param info Current template info * @return A return value boxing property getter */ @Override public final VelPropertyGet getPropertyGet(Object obj, String identifier, Info info) throws Exception { final AnnotatedValueHelper valueHelper = AnnotatedValueHelperFactory.getValueHelper(obj, CLASS_RESOLVER); VelPropertyGet getter = super.getPropertyGet(valueHelper.unbox(), identifier, info); if (getter == null) { return null; } log.debug("Getting introspector method for getter: {}", getter.getMethodName()); Method refMethod = lookupMethod(getter.getMethodName(), valueHelper, EMPTY_ARRAY, info); log.debug("got method: {}", refMethod); if (refMethod == null) { return getter; } Collection<Annotation> annotations = getMethodAnnotations(refMethod); log.debug("Got return annotations: {}", annotations); if (annotations.isEmpty()) { return getter; } return new AnnotationBoxingPropertyGet(getter, annotations); }