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