protected List<IResolvedConstructor> computeDeclaredConstructors() { JvmType rawType = getRawType(); if (!(rawType instanceof JvmGenericType)) { return Collections.emptyList(); } List<IResolvedConstructor> result = Lists.newArrayList(); for(JvmConstructor constructor: ((JvmGenericType)rawType).getDeclaredConstructors()) { result.add(new ResolvedConstructor(constructor, getType())); } return Collections.unmodifiableList(result); }
protected void addOperationCandidates(final ResolvedFeatures resolvedFeatures, final IVisibilityHelper visibilityHelper, final List<IResolvedExecutable> result) { List<IResolvedOperation> allOperations = resolvedFeatures.getAllOperations(); LightweightTypeReference inferredType = resolvedFeatures.getType(); for (final IResolvedOperation operation : allOperations) { boolean _isCandidate = this.isCandidate(inferredType, operation, visibilityHelper); if (_isCandidate) { result.add(operation); } } }
protected List<IResolvedField> computeDeclaredFields() { JvmType rawType = getRawType(); if (!(rawType instanceof JvmGenericType)) { return Collections.emptyList(); } List<IResolvedField> result = Lists.newArrayList(); for(JvmField field: ((JvmGenericType)rawType).getDeclaredFields()) { result.add(new ResolvedField(field, getType())); } return Collections.unmodifiableList(result); }
public List<IResolvedExecutable> getImplementationCandidates(final JvmDeclaredType type, final boolean isAnonymous) { if (((type == null) || (!(type instanceof JvmGenericType)))) { return Collections.<IResolvedExecutable>emptyList(); } JavaVersion sourceVersion = this.generatorConfigProvider.get(type).getJavaSourceVersion(); ResolvedFeatures resolvedFeatures = this.overrideHelper.getResolvedFeatures(type, sourceVersion); List<IResolvedExecutable> result = Lists.<IResolvedExecutable>newArrayList(); LightweightTypeReference _type = resolvedFeatures.getType(); ContextualVisibilityHelper contextualVisibilityHelper = new ContextualVisibilityHelper(this.visibilityHelper, _type); this.addOperationCandidates(resolvedFeatures, contextualVisibilityHelper, result); if (((!isAnonymous) && (!((JvmGenericType) type).isInterface()))) { this.addConstructorCandidates(resolvedFeatures, contextualVisibilityHelper, result); } return result; }
protected void addConstructorCandidates(final ResolvedFeatures resolvedFeatures, final IVisibilityHelper visibilityHelper, final List<IResolvedExecutable> result) { LightweightTypeReference typeReference = resolvedFeatures.getType(); List<LightweightTypeReference> superTypes = typeReference.getSuperTypes(); for (final LightweightTypeReference superType : superTypes) {
operationsMissingImplementation = Lists.newArrayList(); IVisibilityHelper visibilityHelper = new ContextualVisibilityHelper(this.visibilityHelper, resolvedFeatures.getType()); boolean flaggedType = false; for (IResolvedOperation operation : resolvedFeatures.getAllOperations()) {