public class MethodDecorator
extends java.lang.Object
| 限定符和类型 | 类和说明 |
|---|---|
class |
MethodDecorator.Parameter |
| 限定符和类型 | 字段和说明 |
|---|---|
protected java.lang.String |
docSignature |
protected java.lang.reflect.Method |
method |
protected java.lang.String[] |
parameterNames |
protected MethodDecorator.Parameter[] |
parameters |
protected java.util.Map<java.lang.String,MethodDecorator.Parameter> |
paramMap |
| 构造器和说明 |
|---|
MethodDecorator(java.lang.reflect.Method method)
构造方法
从 Method构造对象 |
MethodDecorator(java.lang.reflect.Method method,
java.lang.String[] parameterNames)
构造方法
从 Method构造对象 |
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.reflect.Method |
delegate() |
boolean |
equals(java.lang.Object obj) |
<T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<T> annotationClass) |
java.lang.annotation.Annotation[] |
getAnnotations() |
java.lang.annotation.Annotation[] |
getDeclaredAnnotations() |
java.lang.Class<?> |
getDeclaringClass() |
java.lang.Object |
getDefaultValue() |
java.lang.String |
getDocSignature() |
java.lang.String |
getDocSignature(boolean fn) |
java.lang.String |
getDocSignature(java.util.Map<java.lang.String,java.lang.Class<?>> importedList) |
java.lang.Class<?>[] |
getExceptionTypes() |
java.lang.reflect.Type[] |
getGenericExceptionTypes() |
java.util.Set<java.lang.reflect.Type> |
getGenericExceptionTypeSet() |
java.lang.reflect.Type[] |
getGenericParameterTypes() |
java.lang.reflect.Type |
getGenericReturnType() |
int |
getModifiers() |
java.lang.String |
getName() |
MethodDecorator.Parameter |
getParameter(java.lang.String name)
获取参数名对应的
MethodDecorator.Parameter对象,参数名无效返回null |
java.lang.annotation.Annotation[][] |
getParameterAnnotations() |
java.lang.String[] |
getParameterNames() |
MethodDecorator.Parameter[] |
getParameters() |
java.lang.Class<?>[] |
getParameterTypes() |
java.lang.Class<?> |
getReturnType() |
java.lang.String |
getSignature() |
java.lang.reflect.TypeVariable<java.lang.reflect.Method>[] |
getTypeParameters() |
int |
hashCode() |
java.lang.Object |
invoke(java.lang.Object obj,
java.lang.Object... args) |
boolean |
isAccessible() |
boolean |
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) |
boolean |
isBridge() |
boolean |
isSynthetic() |
boolean |
isVarArgs() |
void |
setAccessible(boolean flag) |
java.lang.String |
toGenericString() |
java.lang.String |
toGenericString(boolean fullClassName)
输出类名简写的(泛型)方法描述字符串
|
java.lang.String |
toString()
输出类名简写的方法描述字符串
|
java.lang.String |
toString(boolean fullClassName)
是否显示类的全名
|
protected final java.lang.reflect.Method method
protected final java.lang.String[] parameterNames
protected final java.util.Map<java.lang.String,MethodDecorator.Parameter> paramMap
protected final MethodDecorator.Parameter[] parameters
protected final java.lang.String docSignature
public MethodDecorator(java.lang.reflect.Method method)
Method构造对象method - public MethodDecorator(java.lang.reflect.Method method,
java.lang.String[] parameterNames)
Method构造对象method - 方法对象parameterNames - 方法的参数名,为null则将参数名自动按arg0...argN格式填充.public void setAccessible(boolean flag)
throws java.lang.SecurityException
flag - java.lang.SecurityExceptionAccessibleObject.setAccessible(boolean)public boolean isAccessible()
AccessibleObject.isAccessible()public java.lang.Class<?> getDeclaringClass()
Method.getDeclaringClass()public java.lang.String getName()
Method.getName()public int getModifiers()
Method.getModifiers()public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
annotationClass - AccessibleObject.isAnnotationPresent(java.lang.Class)public java.lang.reflect.TypeVariable<java.lang.reflect.Method>[] getTypeParameters()
Method.getTypeParameters()public java.lang.annotation.Annotation[] getAnnotations()
AccessibleObject.getAnnotations()public java.lang.Class<?> getReturnType()
Method.getReturnType()public java.lang.reflect.Type getGenericReturnType()
Method.getGenericReturnType()public java.lang.Class<?>[] getParameterTypes()
Method.getParameterTypes()public java.lang.reflect.Type[] getGenericParameterTypes()
Method.getGenericParameterTypes()public java.lang.Class<?>[] getExceptionTypes()
Method.getExceptionTypes()public java.lang.reflect.Type[] getGenericExceptionTypes()
Method.getGenericExceptionTypes()public boolean equals(java.lang.Object obj)
equals 在类中 java.lang.Objectobj - Method.equals(java.lang.Object)public int hashCode()
hashCode 在类中 java.lang.ObjectMethod.hashCode()public java.lang.Object invoke(java.lang.Object obj,
java.lang.Object... args)
throws java.lang.IllegalAccessException,
java.lang.IllegalArgumentException,
java.lang.reflect.InvocationTargetException
obj - args - java.lang.IllegalAccessExceptionjava.lang.IllegalArgumentExceptionjava.lang.reflect.InvocationTargetExceptionMethod.invoke(java.lang.Object, java.lang.Object[])public boolean isBridge()
Method.isBridge()public boolean isVarArgs()
Method.isVarArgs()public boolean isSynthetic()
Method.isSynthetic()public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
annotationClass - Method.getAnnotation(java.lang.Class)public java.lang.annotation.Annotation[] getDeclaredAnnotations()
Method.getDeclaredAnnotations()public java.lang.Object getDefaultValue()
Method.getDefaultValue()public java.lang.annotation.Annotation[][] getParameterAnnotations()
Method.getParameterAnnotations()public MethodDecorator.Parameter getParameter(java.lang.String name)
MethodDecorator.Parameter对象,参数名无效返回nullname - MethodDecorator.Parameter对象Map.get(java.lang.Object)public java.lang.String[] getParameterNames()
public java.lang.String toGenericString()
Method.toGenericString()public java.lang.String toGenericString(boolean fullClassName)
fullClassName - 是否显示类的全名Method.toGenericString()public java.lang.String toString()
toString 在类中 java.lang.ObjecttoString(boolean),
Method.toString()public java.lang.String toString(boolean fullClassName)
fullClassName - Method.toString()public MethodDecorator.Parameter[] getParameters()
public final java.lang.String getDocSignature(boolean fn)
public java.lang.String getDocSignature(java.util.Map<java.lang.String,java.lang.Class<?>> importedList)
public java.util.Set<java.lang.reflect.Type> getGenericExceptionTypeSet()
public final java.lang.String getDocSignature()
public final java.lang.String getSignature()
public java.lang.reflect.Method delegate()
Copyright © 2023. All Rights Reserved.