/** * Returns the type signature for the field, possibly including type parameters. If the type signature is null, * indicating that no type signature information is available for this field, returns the type descriptor * instead. * * @return The parsed type signature for the field, or if not available, the parsed type descriptor for the * field. */ public TypeSignature getTypeSignatureOrTypeDescriptor() { final TypeSignature typeSig = getTypeSignature(); if (typeSig != null) { return typeSig; } else { return getTypeDescriptor(); } }
/** Get the names of any classes in the type descriptor or type signature. */ @Override protected void getReferencedClassNames(final Set<String> classNames) { final TypeSignature methodSig = getTypeSignature(); if (methodSig != null) { methodSig.getReferencedClassNames(classNames); } final TypeSignature methodDesc = getTypeDescriptor(); if (methodDesc != null) { methodDesc.getReferencedClassNames(classNames); } if (annotationInfo != null) { for (final AnnotationInfo annotationInfo : annotationInfo) { annotationInfo.getReferencedClassNames(classNames); } } }