protected List<Method> getInjectorMethods() { Class<?> toIntrospect = null; //Method[] methods = new Method[0]; try { //methods = super.getComponentImplementation().getMethods(); toIntrospect = super.getComponentImplementation(); } catch (AmbiguousComponentResolutionException e) { e.setComponent(getComponentImplementation()); throw e; } if (toIntrospect == null) { throw new NullPointerException("No implementation class defined for " + this); } HashMap<String, Set<Method>> allMethodsAnalyzed = new HashMap<String,Set<Method>>(); List<Method> methodz = new ArrayList<Method>(); recursiveCheckInjectorMethods(toIntrospect, toIntrospect, methodz, allMethodsAnalyzed); //Inject in JSR330 compliant order. Collections.sort(methodz, new JSR330AccessibleObjectOrderComparator()); return methodz; }
protected List<Method> getInjectorMethods() { Class<?> toIntrospect = null; //Method[] methods = new Method[0]; try { //methods = super.getComponentImplementation().getMethods(); toIntrospect = super.getComponentImplementation(); } catch (AmbiguousComponentResolutionException e) { e.setComponent(getComponentImplementation()); throw e; } if (toIntrospect == null) { throw new NullPointerException("No implementation class defined for " + this); } HashMap<String, Set<Method>> allMethodsAnalyzed = new HashMap<String,Set<Method>>(); List<Method> methodz = new ArrayList<Method>(); recursiveCheckInjectorMethods(toIntrospect, toIntrospect, methodz, allMethodsAnalyzed); //Inject in JSR330 compliant order. Collections.sort(methodz, new JSR330AccessibleObjectOrderComparator()); return methodz; }
protected Object[] getMemberArguments(final PicoContainer container, final AccessibleObject member, final Type[] parameterTypes, final Annotation[] bindings, final Type into) { boxParameters(parameterTypes); //Object[] result = new Object[parameterTypes.length]; List<Object> result = new ArrayList<Object>(parameterTypes.length); AccessibleObjectParameterSet objectParameterSet = this.getParameterToUseForObject(member, parameters); Parameter[] currentParameters = objectParameterSet.getParams(); for (int i = 0; i < currentParameters.length; i++) { try { Object parameterResult = getParameter(container, member, i, parameterTypes[i], bindings[i], currentParameters[i], null, into); if (parameterResult != Parameter.NULL_RESULT) { result.add(parameterResult); } } catch (AmbiguousComponentResolutionException e) { e.setComponent(getComponentImplementation()); e.setMember(member); e.setParameterNumber(i); throw e; } } return result.toArray(); }
protected Object[] getMemberArguments(final PicoContainer container, final AccessibleObject member, final Type[] parameterTypes, final Annotation[] bindings, final Type into) { boxParameters(parameterTypes); //Object[] result = new Object[parameterTypes.length]; List<Object> result = new ArrayList<Object>(parameterTypes.length); AccessibleObjectParameterSet objectParameterSet = this.getParameterToUseForObject(member, parameters); Parameter[] currentParameters = objectParameterSet.getParams(); for (int i = 0; i < currentParameters.length; i++) { try { Object parameterResult = getParameter(container, member, i, parameterTypes[i], bindings[i], currentParameters[i], null, into); if (parameterResult != Parameter.NULL_RESULT) { result.add(parameterResult); } } catch (AmbiguousComponentResolutionException e) { e.setComponent(getComponentImplementation()); e.setMember(member); e.setParameterNumber(i); throw e; } } return result.toArray(); }