public abstract class JAbstractMethod extends Object implements JAbstractMethod
JMethod
and JConstructor
.Modifier and Type | Method and Description |
---|---|
JParameter |
findParameter(String name) |
<T extends Annotation> |
getAnnotation(Class<T> annotationClass)
Returns an instance of the specified annotation type if it is present on
this element or
null if it is not. |
Annotation[] |
getAnnotations()
Returns all the annotations present on this element.
|
Annotation[] |
getDeclaredAnnotations()
Returns the annotations declared directly on this element; does not include
any inherited annotations.
|
abstract JClassType |
getEnclosingType()
Gets the type in which this method or constructor was declared.
|
JType[] |
getErasedParameterTypes() |
abstract String |
getJsniSignature()
Returns a string contating a JSNI reference to the method.
|
String[][] |
getMetaData(String tagName)
Deprecated.
|
String[] |
getMetaDataTags()
Deprecated.
|
protected int |
getModifierBits() |
String |
getName() |
JParameter[] |
getParameters() |
JType[] |
getParameterTypes() |
abstract String |
getReadableDeclaration() |
JClassType[] |
getThrows() |
JTypeParameter[] |
getTypeParameters()
Returns the type parameters on this element.
|
JAnnotationMethod |
isAnnotationMethod() |
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationClass)
Returns
true if this item has an annotation of the specified
type. |
abstract JConstructor |
isConstructor() |
boolean |
isDefaultAccess() |
abstract JMethod |
isMethod() |
boolean |
isPrivate() |
boolean |
isProtected() |
boolean |
isPublic() |
boolean |
isVarArgs() |
protected void |
toStringParamsAndThrows(StringBuilder sb) |
protected void |
toStringTypeParams(StringBuilder sb) |
public JParameter findParameter(String name)
findParameter
in interface JAbstractMethod
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
HasAnnotations
null
if it is not. For a class, this will
look for annotations on supertypes as well.getAnnotation
in interface HasAnnotations
annotationClass
- annotation type to search fornull
if it is notpublic Annotation[] getAnnotations()
HasAnnotations
getAnnotations
in interface HasAnnotations
public Annotation[] getDeclaredAnnotations()
HasAnnotations
getDeclaredAnnotations
in interface HasAnnotations
public abstract JClassType getEnclosingType()
getEnclosingType
in interface JAbstractMethod
public JType[] getErasedParameterTypes()
getErasedParameterTypes
in interface JAbstractMethod
public abstract String getJsniSignature()
getJsniSignature
in interface JAbstractMethod
@package.Class::method(Lpackage/Param;...)
@Deprecated public final String[][] getMetaData(String tagName)
HasMetaData
getMetaData
in interface HasMetaData
@Deprecated public final String[] getMetaDataTags()
HasMetaData
getMetaDataTags
in interface HasMetaData
public String getName()
getName
in interface JAbstractMethod
public JParameter[] getParameters()
getParameters
in interface JAbstractMethod
public JType[] getParameterTypes()
getParameterTypes
in interface JAbstractMethod
public abstract String getReadableDeclaration()
getReadableDeclaration
in interface JAbstractMethod
public JClassType[] getThrows()
getThrows
in interface JAbstractMethod
public JTypeParameter[] getTypeParameters()
HasTypeParameters
getTypeParameters
in interface HasTypeParameters
public JAnnotationMethod isAnnotationMethod()
isAnnotationMethod
in interface JAbstractMethod
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
HasAnnotations
true
if this item has an annotation of the specified
type. For a class, this will look at supertypes as well.isAnnotationPresent
in interface HasAnnotations
true
if this item has an annotation of the specified
typepublic abstract JConstructor isConstructor()
isConstructor
in interface JAbstractMethod
public boolean isDefaultAccess()
isDefaultAccess
in interface JAbstractMethod
public abstract JMethod isMethod()
isMethod
in interface JAbstractMethod
public boolean isPrivate()
isPrivate
in interface JAbstractMethod
public boolean isProtected()
isProtected
in interface JAbstractMethod
public boolean isPublic()
isPublic
in interface JAbstractMethod
public boolean isVarArgs()
isVarArgs
in interface JAbstractMethod
protected int getModifierBits()
protected void toStringParamsAndThrows(StringBuilder sb)
protected void toStringTypeParams(StringBuilder sb)
Copyright © 2018. All rights reserved.