public interface JavaMethod extends JavaAnnotatedElement, JavaMember, JavaModel, JavaGenericDeclaration, JavaExecutable
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCallSignature() |
java.lang.String |
getDeclarationSignature(boolean withModifiers) |
java.lang.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
|
DocletTag |
getTagByName(java.lang.String string,
boolean b) |
java.util.List<DocletTag> |
getTagsByName(java.lang.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 |
signatureMatches(java.lang.String name,
java.util.List<JavaType> parameterTypes)
This method is NOT varArg aware.
|
boolean |
signatureMatches(java.lang.String name,
java.util.List<JavaType> parameterTypes,
boolean varArg) |
getAnnotations, getComment, getNamedParameter, getTagByName, getTags, getTagsByName
getCodeBlock, getLineNumber
getDeclaringClass, getExceptions, getExceptionTypes, getParameterByName, getParameters, getParameterTypes, getParameterTypes, getSourceCode, isVarArgs
getModifiers, getName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile
getTypeParameters
JavaClass getReturns()
java.lang.String getDeclarationSignature(boolean withModifiers)
withModifiers
- true
if modifiers should be added, otherwise false
java.lang.String getCallSignature()
boolean signatureMatches(java.lang.String name, java.util.List<JavaType> parameterTypes)
name
- the name of the methodparameterTypes
- the parameter types of the method, can be null
true
if this method matches the signature, otherwise false
boolean signatureMatches(java.lang.String name, java.util.List<JavaType> parameterTypes, boolean varArg)
name
- the name of the methodparameterTypes
- the parameter types, can be null
varArg
- true
is signature should match a varArg-method, otherwise false
true
if this method matches the signature, otherwise false
boolean 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 false
boolean 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 false
JavaType getPropertyType()
null
if this method
is not a property mutator or property accessor.java.lang.String getPropertyName()
null
if this method
is not a property mutator or property accessor.java.util.List<DocletTag> getTagsByName(java.lang.String name, boolean inherited)
JavaType getReturnType()
JavaType getReturnType(boolean resolve)
resolve
- define if generic should be resolvedDocletTag getTagByName(java.lang.String string, boolean b)
boolean isDefault()
Method.isDefault()
true
if this is a default method of an interface, otherwise false