@Override public boolean canAnnotationTargetType() { return getDelegate().canAnnotationTargetType(); }
@Override public boolean doesNotExposeShadowMungers() { return getDelegate().doesNotExposeShadowMungers(); }
@Override public AnnotationTargetKind[] getAnnotationTargetKinds() { return getDelegate().getAnnotationTargetKinds(); }
private ReferenceType makeGenericTypeFrom(ReferenceTypeDelegate delegate, ReferenceType rawType) { String genericSig = delegate.getDeclaredGenericSignature(); if (genericSig != null) { return new ReferenceType(UnresolvedType.forGenericTypeSignature(rawType.getSignature(), delegate.getDeclaredGenericSignature()), this); } else { return new ReferenceType(UnresolvedType.forGenericTypeVariables(rawType.getSignature(), delegate.getTypeVariables()), this); } }
&& this.delegate.copySourceContext() && this.delegate.getSourceContext() != SourceContextImpl.UNKNOWN_SOURCE_CONTEXT) { ((AbstractReferenceTypeDelegate) delegate) .setSourceContext(this.delegate.getSourceContext());
@Override public AnnotationAJ[] getAnnotations() { return getDelegate().getAnnotations(); }
public String getGenericSignature() { String sig = getDelegate().getDeclaredGenericSignature(); return (sig == null) ? "" : sig; }
@Override public int getCompilerVersion() { return getDelegate().getCompilerVersion(); }
@Override public ResolvedType[] getAnnotationTypes() { if (getDelegate() == null) { throw new BCException("Unexpected null delegate for type " + this.getName()); } if (annotationTypes == null) { // there are no extras: return getDelegate().getAnnotationTypes(); } else { ResolvedType[] delegateAnnotationTypes = getDelegate() .getAnnotationTypes(); ResolvedType[] result = new ResolvedType[annotationTypes.length + delegateAnnotationTypes.length]; System.arraycopy(delegateAnnotationTypes, 0, result, 0, delegateAnnotationTypes.length); System.arraycopy(annotationTypes, 0, result, delegateAnnotationTypes.length, annotationTypes.length); return result; } }
@Override public void ensureConsistent() { annotations = null; annotationTypes = null; newSuperclass = null; bits = 0; // clears the hierarchy complete tag (amongst other things) newInterfaces = null; typeVariables = null; parameterizedInterfaces.clear(); superclassReference = new WeakReference<ResolvedType>(null); if (getDelegate() != null) { delegate.ensureConsistent(); } if (isParameterizedOrRawType()) { ReferenceType genericType = getGenericType(); if (genericType != null) { genericType.ensureConsistent(); } } }
@Override public ResolvedMember[] getDeclaredFields() { if (parameterizedFields != null) { return parameterizedFields; } if (isParameterizedType() || isRawType()) { ResolvedMember[] delegateFields = getDelegate().getDeclaredFields(); parameterizedFields = new ResolvedMember[delegateFields.length]; for (int i = 0; i < delegateFields.length; i++) { parameterizedFields[i] = delegateFields[i].parameterizedWith( getTypesForMemberParameterization(), this, isParameterizedType()); } return parameterizedFields; } else { return getDelegate().getDeclaredFields(); } }
@Override public AnnotationAJ getAnnotationOfType(UnresolvedType ofType) { AnnotationAJ[] axs = getDelegate().getAnnotations(); if (axs != null) { for (int i = 0; i < axs.length; i++) { if (axs[i].getTypeSignature().equals(ofType.getSignature())) { return axs[i]; } } } if (annotations != null) { String searchSig = ofType.getSignature(); for (int i = 0; i < annotations.length; i++) { if (annotations[i].getTypeSignature().equals(searchSig)) { return annotations[i]; } } } return null; }
public String getDeclaredGenericSignature() { return getDelegate().getDeclaredGenericSignature(); }