@SuppressWarnings("unchecked") AssistedConstructor(Constructor<T> constructor, List<TypeLiteral<?>> parameterTypes) { this.constructor = constructor; Annotation[][] annotations = constructor.getParameterAnnotations(); List<Type> typeList = new ArrayList<>(); allParameters = new ArrayList<>(parameterTypes.size()); // categorize params as @Assisted or @Injected for (int i = 0; i < parameterTypes.size(); i++) { Parameter parameter = new Parameter(parameterTypes.get(i).getType(), annotations[i]); allParameters.add(parameter); if (parameter.isProvidedByFactory()) { typeList.add(parameter.getType()); } } this.assistedParameters = new ParameterListKey(typeList); }
@SuppressWarnings("unchecked") AssistedConstructor(Constructor<T> constructor, List<TypeLiteral<?>> parameterTypes) { this.constructor = constructor; Annotation[][] annotations = constructor.getParameterAnnotations(); List<Type> typeList = new ArrayList<>(); allParameters = new ArrayList<>(parameterTypes.size()); // categorize params as @Assisted or @Injected for (int i = 0; i < parameterTypes.size(); i++) { Parameter parameter = new Parameter(parameterTypes.get(i).getType(), annotations[i]); allParameters.add(parameter); if (parameter.isProvidedByFactory()) { typeList.add(parameter.getType()); } } this.assistedParameters = new ParameterListKey(typeList); }
@SuppressWarnings("unchecked") AssistedConstructor(Constructor<T> constructor, List<TypeLiteral<?>> parameterTypes) { this.constructor = constructor; Annotation[][] annotations = constructor.getParameterAnnotations(); List<Type> typeList = new ArrayList<>(); allParameters = new ArrayList<>(parameterTypes.size()); // categorize params as @Assisted or @Injected for (int i = 0; i < parameterTypes.size(); i++) { Parameter parameter = new Parameter(parameterTypes.get(i).getType(), annotations[i]); allParameters.add(parameter); if (parameter.isProvidedByFactory()) { typeList.add(parameter.getType()); } } this.assistedParameters = new ParameterListKey(typeList); }
@SuppressWarnings("unchecked") AssistedConstructor(Constructor<T> constructor, List<TypeLiteral<?>> parameterTypes) { this.constructor = constructor; Annotation[][] annotations = constructor.getParameterAnnotations(); List<Type> typeList = new ArrayList<>(); allParameters = new ArrayList<>(parameterTypes.size()); // categorize params as @Assisted or @Injected for (int i = 0; i < parameterTypes.size(); i++) { Parameter parameter = new Parameter(parameterTypes.get(i).getType(), annotations[i]); allParameters.add(parameter); if (parameter.isProvidedByFactory()) { typeList.add(parameter.getType()); } } this.assistedParameters = new ParameterListKey(typeList); }
@SuppressWarnings("unchecked") public AssistedConstructor(Constructor<T> constructor, List<TypeLiteral<?>> parameterTypes) { this.constructor = constructor; Annotation[][] annotations = constructor.getParameterAnnotations(); List<Type> typeList = new ArrayList<>(); allParameters = new ArrayList<>(); // categorize params as @Assisted or @Injected for (int i = 0; i < parameterTypes.size(); i++) { Parameter parameter = new Parameter(parameterTypes.get(i).getType(), annotations[i]); allParameters.add(parameter); if (parameter.isProvidedByFactory()) { typeList.add(parameter.getType()); } } this.assistedParameters = new ParameterListKey(typeList); }