public interface JavaMethod extends JavaMember, JavaIsGeneric
| Modifier and Type | Field and Description | 
|---|---|
static JavaMethod[] | 
EMPTY_ARRAY  | 
| Modifier and Type | Method and Description | 
|---|---|
java.util.Collection<JavaClass> | 
getDeclaredAnonymousClasses()
Get the anonymous classes declared in this method. 
 | 
java.util.Collection<JavaClass> | 
getDeclaredLocalClasses()
Get the local classes declared in this method. 
 | 
java.lang.Object | 
getDefaultValue()  | 
java.lang.String | 
getDescriptor()
Important: This is not the same as getReturnType().getDescriptor() which
 is synonymous with getReturnType().getDescriptor(). 
 | 
java.util.Collection<JavaType> | 
getExceptions()  | 
JavaMethod | 
getMethodErasure()
Gets the erasure for this method. 
 | 
default JavaMethod | 
getNonParameterizedMethod()
Get the JavaMethod as it was declared. 
 | 
java.util.Collection<JavaMethod> | 
getOverriddenMethods()
According to the JLS, implementing methods are overriding methods
 where the overriden method is abstract. 
 | 
java.util.Collection<JavaVariable> | 
getParameters()  | 
JavaType[] | 
getParameterTypes()  | 
java.util.Collection<JavaAnnotation> | 
getReceiverTypeAnnotations()
Get the receiver annotations for this method. 
 | 
JavaType | 
getReturnType()
All constructors have a return type of "void". 
 | 
java.lang.String | 
getSignature()
Important: This is not the same as getReturnType().getSignature() which
 is synonymous with getReturnType().getSignature(). 
 | 
SourceMethod | 
getSourceElement()  | 
java.lang.String | 
getTypeSignature()
Not a JVMS term. 
 | 
boolean | 
hasSubsignatureOf(JavaMethod other)
True if this method's signature is a subsignature of the other
 method's signature. 
 | 
boolean | 
isConstructor()  | 
boolean | 
isNative()  | 
boolean | 
isVarargs()  | 
getActualTypeArguments, getTypeParameter, getTypeParameters, hasActualTypeArguments, hasTypeParametersgetOwningClass, getUniqueIdentifier, isAbstract, isPackagePrivate, isPrivate, isProtected, isPublic, isStaticgetResolvedType, getUnresolvedTypegetNamegetAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotations, hasAnnotation, hasDeclaredAnnotationgetElementKind, getFile, getModifiers, getOwner, isDeprecated, isFinal, isHidden, isMandated, isSourceElement, isSynthetic, printCompiledInfostatic final JavaMethod[] EMPTY_ARRAY
boolean isConstructor()
boolean isVarargs()
boolean isNative()
JavaMethod getMethodErasure()
The erasure of a method that is not at all generic is trivially itself. The erasure of a method that is completely unparameterized method is also trivially itself.
Note: Erasure is performed strictly on this method and its owning type and is not performed on any of the contained types. For example, consider the method List<String>.get(int) which has a String return type. The parameterization is from List's E type parameter to String. Erasing the parameterization leaves us with List.get(int) which returns has a E return type.
JavaType getReturnType()
java.util.Collection<JavaVariable> getParameters()
JavaType[] getParameterTypes()
java.util.Collection<JavaType> getExceptions()
java.lang.Object getDefaultValue()
JavaVariable.getConstantValue()java.lang.String getDescriptor()
java.lang.String getTypeSignature()
java.lang.String getSignature()
boolean hasSubsignatureOf(JavaMethod other)
java.util.Collection<JavaMethod> getOverriddenMethods()
java.util.Collection<JavaAnnotation> getReceiverTypeAnnotations()
java.util.Collection<JavaClass> getDeclaredAnonymousClasses()
java.util.Collection<JavaClass> getDeclaredLocalClasses()
SourceMethod getSourceElement()
getSourceElement in interface JavaElementdefault JavaMethod getNonParameterizedMethod()