public interface JavaMethod extends JavaAnnotatedElement, JavaMember, JavaModel, JavaGenericDeclaration, JavaExecutable
Modifier and Type | Method and Description |
---|---|
String |
getCallSignature() |
String |
getDeclarationSignature(boolean withModifiers) |
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(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 |
signatureMatches(String name,
List<JavaType> parameterTypes)
This method is NOT varArg aware.
|
boolean |
signatureMatches(String name,
List<JavaType> parameterTypes,
boolean varArg) |
getDeclaringClass, getExceptions, getExceptionTypes, getParameterByName, getParameters, getParameterTypes, getParameterTypes, getSourceCode, isVarArgs
getAnnotations, getComment, getNamedParameter, getTagByName, getTags, getTagsByName
getTypeParameters
getModifiers, getName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile
JavaClass getReturns()
String getDeclarationSignature(boolean withModifiers)
withModifiers
- true
if modifiers should be added, otherwise false
String getCallSignature()
getCallSignature
in interface JavaExecutable
boolean signatureMatches(String name, 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(String name, 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.String getPropertyName()
null
if this method
is not a property mutator or property accessor.JavaType getReturnType()
JavaType getReturnType(boolean resolve)
resolve
- define if generic should be resolvedboolean isDefault()
Method.isDefault()
true
if this is a default method of an interface, otherwise false
Copyright © 2002–2024. All rights reserved.