public class MethodAttributes extends Object implements MemberAttributes<Method>
| 构造器和说明 |
|---|
MethodAttributes(Method method) |
| 限定符和类型 | 方法和说明 |
|---|---|
Method |
get() |
<T extends Annotation> |
getAnnotation(Class<T> annotation)
Return the
T annotation object from this field if it exist; otherwise returns
null. |
Collection<Annotation> |
getAnnotations()
Return the annotations that are present on this field.
|
Class<?> |
getDeclaringClass() |
int |
getModifier() |
String |
getName() |
boolean |
hasModifier(int modifier)
Returns
true if the field is defined with the modifier. |
public MethodAttributes(Method method)
public int getModifier()
getModifier 在接口中 MemberAttributes<Method>public Method get()
get 在接口中 MemberAttributes<Method>public Class<?> getDeclaringClass()
getDeclaringClass 在接口中 MemberAttributes<Method>public String getName()
getName 在接口中 MemberAttributes<Method>public <T extends Annotation> T getAnnotation(Class<T> annotation)
T annotation object from this field if it exist; otherwise returns
null.getAnnotation 在接口中 MemberAttributes<Method>annotation - the class of the annotation that will be retrievednullpublic Collection<Annotation> getAnnotations()
getAnnotations 在接口中 MemberAttributes<Method>public boolean hasModifier(int modifier)
true if the field is defined with the modifier.
This method is meant to be called as:
boolean hasPublicModifier = fieldAttribute.hasModifier(java.lang.reflect.Modifier.PUBLIC);
hasModifier 在接口中 MemberAttributes<Method>ModifierCopyright © 2020. All rights reserved.