public class Parameter extends Object implements AnnotatedElement
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object obj)
Compares based on the executable and the index.
|
<T extends Annotation> |
getAnnotation(Class<T> annotationClass) |
Annotation[] |
getAnnotations() |
<T extends Annotation> |
getDeclaredAnnotation(Class<T> annotationClass) |
Annotation[] |
getDeclaredAnnotations() |
Method |
getDeclaringMethod()
Return the
Executable which declares this parameter. |
int |
getModifiers()
Get the modifier flags for this the parameter represented by
this
Parameter object. |
String |
getName()
Returns the name of the parameter.
|
Class<?> |
getType()
Returns a
Class object that identifies the
declared type for the parameter represented by this
Parameter object. |
int |
hashCode()
Returns a hash code based on the executable's hash code and the
index.
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationClass) |
boolean |
isImplicit()
Returns
true if this parameter is implicitly declared
in source code; returns false otherwise. |
boolean |
isNamePresent()
Returns true if the parameter has a name according to the class
file; returns false otherwise.
|
boolean |
isSynthetic()
Returns
true if this parameter is neither implicitly
nor explicitly declared in source code; returns false
otherwise. |
boolean |
isVarArgs()
Returns
true if this parameter represents a variable
argument list; returns false otherwise. |
String |
toString()
Returns a string describing this parameter.
|
getAnnotationsByType, getDeclaredAnnotationsByTypepublic boolean equals(Object obj)
public int hashCode()
public boolean isNamePresent()
public String toString()
public Method getDeclaringMethod()
Executable which declares this parameter.Executable declaring this parameter.public int getModifiers()
Parameter object.public String getName()
public Class<?> getType()
Class object that identifies the
declared type for the parameter represented by this
Parameter object.Class object identifying the declared
type of the parameter represented by this objectpublic boolean isImplicit()
true if this parameter is implicitly declared
in source code; returns false otherwise.public boolean isSynthetic()
true if this parameter is neither implicitly
nor explicitly declared in source code; returns false
otherwise.public boolean isVarArgs()
true if this parameter represents a variable
argument list; returns false otherwise.true if an only if this parameter represents a
variable argument list.public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
getAnnotation 在接口中 AnnotatedElementNullPointerExceptionpublic boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
isAnnotationPresent 在接口中 AnnotatedElementpublic Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations 在接口中 AnnotatedElementpublic <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass)
getDeclaredAnnotation 在接口中 AnnotatedElementNullPointerExceptionpublic Annotation[] getAnnotations()
getAnnotations 在接口中 AnnotatedElementCopyright © 2020. All rights reserved.