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