public interface JavaMethod extends JavaAnnotatedElement, JavaMember, JavaModel, JavaGenericDeclaration, ParameterDeclarator
| Modifier and Type | Method and Description |
|---|---|
String |
getCallSignature() |
String |
getDeclarationSignature(boolean withModifiers) |
List<JavaClass> |
getExceptions() |
List<JavaType> |
getExceptionTypes() |
JavaClass |
getGenericReturnType()
Deprecated.
use
getReturnType() instead, this one holds generic information |
JavaParameter |
getParameterByName(String name) |
List<JavaParameter> |
getParameters() |
List<JavaType> |
getParameterTypes() |
List<JavaType> |
getParameterTypes(boolean resolve)
If a class inherits this method from a generic class or interface, you can use this method to get the resolved parameter types
|
JavaClass |
getParentClass()
Deprecated.
use
JavaMember.getDeclaringClass() instead |
String |
getPropertyName() |
JavaType |
getPropertyType() |
JavaClass |
getReturns() |
JavaType |
getReturnType()
Equivalent of java.lang.reflect.Method.getReturnType()
|
JavaType |
getReturnType(boolean resolve)
If a class inherits this method from a generic class or interface, you can use this method to get the resolved return type
|
String |
getSourceCode()
Get the original source code of the body of this method.
|
DocletTag |
getTagByName(String string,
boolean b) |
List<DocletTag> |
getTagsByName(String name,
boolean inherited) |
boolean |
isDefault()
Equivalent
Method.isDefault() |
boolean |
isPropertyAccessor()
Returns
true if this method follows the bean convention of being an accessor. |
boolean |
isPropertyMutator()
Returns
true if this method follows the bean convention of being an mutator. |
boolean |
isVarArgs()
Equivalent of
Method.isVarArgs() |
boolean |
signatureMatches(String name,
List<JavaType> parameterTypes)
This method is NOT varArg aware.
|
boolean |
signatureMatches(String name,
List<JavaType> parameterTypes,
boolean varArg) |
getAnnotations, getComment, getNamedParameter, getTagByName, getTags, getTagsByNamegetDeclaringClass, getModifiers, getName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatilegetCodeBlock, getLineNumber, getSourcegetTypeParametersJavaClass getGenericReturnType()
getReturnType() instead, this one holds generic informationJavaClass getParentClass()
JavaMember.getDeclaringClass() insteadgetParentClass in interface ParameterDeclaratorJavaClass getReturns()
List<JavaParameter> getParameters()
JavaParameter getParameterByName(String name)
boolean isVarArgs()
Method.isVarArgs()true if this method was declared to take a variable number of arguments,
otherwise falseString getDeclarationSignature(boolean withModifiers)
String getCallSignature()
boolean signatureMatches(String name, List<JavaType> parameterTypes)
name - the name of the methodparameterTypes - the parameter types of the method, can be nulltrue if this method matches the signature, otherwise falseboolean signatureMatches(String name, List<JavaType> parameterTypes, boolean varArg)
name - the name of the methodparameterTypes - the parameter types, can be nullvarArg - true is signature should match a varArg-method, otherwise falsetrue if this method matches the signature, otherwise falseboolean isPropertyAccessor()
true if this method follows the bean convention of being an accessor.
public String getName(); // true public boolean isValid() // true public String getName( String def ); // false, it has a parameter public String gettingUp(); // false, 'get' is not followed by an uppercase character public boolean isolate(); // false, 'is' is not followed by an uppercase character public static String getName(); // false, it is static
true if this method is a Java Bean accessor, otherwise falseboolean isPropertyMutator()
true if this method follows the bean convention of being an mutator.
public void setName(String name); // true public void setUp(); // false, it has no parameter public void settingUp(String def); // false, 'set' is not followed by an uppercase character public static void setName(String name); // false, it is static
true if this method is a Java Bean mutator, otherwise falseJavaType getPropertyType()
null if this method
is not a property mutator or property accessor.String getPropertyName()
null if this method
is not a property mutator or property accessor.String getSourceCode()
JavaType getReturnType()
JavaType getReturnType(boolean resolve)
resolve - define if generic should be resolvedList<JavaType> getParameterTypes(boolean resolve)
resolve - boolean isDefault()
Method.isDefault()true if this is a default method of an interface, otherwise falseCopyright © 2002–2016. All rights reserved.