/** * Returns all methods that are applicable to actual * parameter types represented by this ArgumentTypes object. */ LinkedList<CallableMemberDescriptor> getApplicables( List<ReflectionCallableMemberDescriptor> memberDescs, boolean varArg) { LinkedList<CallableMemberDescriptor> applicables = new LinkedList<CallableMemberDescriptor>(); for (ReflectionCallableMemberDescriptor memberDesc : memberDescs) { int difficulty = isApplicable(memberDesc, varArg); if (difficulty != CONVERSION_DIFFICULTY_IMPOSSIBLE) { if (difficulty == CONVERSION_DIFFICULTY_REFLECTION) { applicables.add(memberDesc); } else if (difficulty == CONVERSION_DIFFICULTY_FREEMARKER) { applicables.add(new SpecialConversionCallableMemberDescriptor(memberDesc)); } else { throw new BugException(); } } } return applicables; }
/** * Returns all methods that are applicable to actual * parameter types represented by this ArgumentTypes object. */ LinkedList<CallableMemberDescriptor> getApplicables( List<ReflectionCallableMemberDescriptor> memberDescs, boolean varArg) { LinkedList<CallableMemberDescriptor> applicables = new LinkedList<CallableMemberDescriptor>(); for (ReflectionCallableMemberDescriptor memberDesc : memberDescs) { int difficulty = isApplicable(memberDesc, varArg); if (difficulty != CONVERSION_DIFFICULTY_IMPOSSIBLE) { if (difficulty == CONVERSION_DIFFICULTY_REFLECTION) { applicables.add(memberDesc); } else if (difficulty == CONVERSION_DIFFICULTY_FREEMARKER) { applicables.add(new SpecialConversionCallableMemberDescriptor(memberDesc)); } else { throw new BugException(); } } } return applicables; }
/** * Returns all methods that are applicable to actual * parameter types represented by this ArgumentTypes object. */ LinkedList<CallableMemberDescriptor> getApplicables( List<ReflectionCallableMemberDescriptor> memberDescs, boolean varArg) { LinkedList<CallableMemberDescriptor> applicables = new LinkedList<CallableMemberDescriptor>(); for (ReflectionCallableMemberDescriptor memberDesc : memberDescs) { int difficulty = isApplicable(memberDesc, varArg); if (difficulty != CONVERSION_DIFFICULTY_IMPOSSIBLE) { if (difficulty == CONVERSION_DIFFICULTY_REFLECTION) { applicables.add(memberDesc); } else if (difficulty == CONVERSION_DIFFICULTY_FREEMARKER) { applicables.add(new SpecialConversionCallableMemberDescriptor(memberDesc)); } else { throw new BugException(); } } } return applicables; }
@Override Object invokeConstructor(BeansWrapper bw, Object[] args) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, TemplateModelException { convertArgsToReflectionCompatible(bw, args); return callableMemberDesc.invokeConstructor(bw, args); }
@Override TemplateModel invokeMethod(BeansWrapper bw, Object obj, Object[] args) throws TemplateModelException, InvocationTargetException, IllegalAccessException { convertArgsToReflectionCompatible(bw, args); return callableMemberDesc.invokeMethod(bw, obj, args); }
@Override TemplateModel invokeMethod(BeansWrapper bw, Object obj, Object[] args) throws TemplateModelException, InvocationTargetException, IllegalAccessException { convertArgsToReflectionCompatible(bw, args); return callableMemberDesc.invokeMethod(bw, obj, args); }
@Override Object invokeConstructor(BeansWrapper bw, Object[] args) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, TemplateModelException { convertArgsToReflectionCompatible(bw, args); return callableMemberDesc.invokeConstructor(bw, args); }
@Override Object invokeConstructor(BeansWrapper bw, Object[] args) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, TemplateModelException { convertArgsToReflectionCompatible(bw, args); return callableMemberDesc.invokeConstructor(bw, args); }
@Override TemplateModel invokeMethod(BeansWrapper bw, Object obj, Object[] args) throws TemplateModelException, InvocationTargetException, IllegalAccessException { convertArgsToReflectionCompatible(bw, args); return callableMemberDesc.invokeMethod(bw, obj, args); }