Package com.google.common.reflect
Class Parameter
- java.lang.Object
-
- com.google.common.reflect.Parameter
-
- All Implemented Interfaces:
AnnotatedElement
@Beta public final class Parameter extends Object implements AnnotatedElement
Represents a method or constructor parameter.- Since:
- 14.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)<A extends Annotation>
AgetAnnotation(Class<A> annotationType)Annotation[]getAnnotations()Annotation[]getDeclaredAnnotations()Invokable<?,?>getDeclaringInvokable()Returns theInvokablethat declares this parameter.TypeToken<?>getType()Returns the type of the parameter.inthashCode()booleanisAnnotationPresent(Class<? extends Annotation> annotationType)StringtoString()-
Methods inherited from interface java.lang.reflect.AnnotatedElement
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
-
-
-
-
Method Detail
-
getType
public TypeToken<?> getType()
Returns the type of the parameter.
-
getDeclaringInvokable
public Invokable<?,?> getDeclaringInvokable()
Returns theInvokablethat declares this parameter.
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
- Specified by:
isAnnotationPresentin interfaceAnnotatedElement
-
getAnnotation
@Nullable public <A extends Annotation> A getAnnotation(Class<A> annotationType)
- Specified by:
getAnnotationin interfaceAnnotatedElement
-
getAnnotations
public Annotation[] getAnnotations()
- Specified by:
getAnnotationsin interfaceAnnotatedElement
-
getDeclaredAnnotations
public Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotationsin interfaceAnnotatedElement
-
-