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, hasTypeParameters
getOwningClass, getUniqueIdentifier, isAbstract, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
getResolvedType, getUnresolvedType
getName
getAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotations, hasAnnotation, hasDeclaredAnnotation
getElementKind, getFile, getModifiers, getOwner, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic, printCompiledInfo
static final JavaMethod[] EMPTY_ARRAY
boolean isConstructor()
boolean isVarargs()
boolean isNative()
JavaMethod getMethodErasure()
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 JavaElement
default JavaMethod getNonParameterizedMethod()