Package com.google.common.reflect
Class Parameter
java.lang.Object
com.google.common.reflect.Parameter
- All Implemented Interfaces:
AnnotatedElement
Represents a method or constructor parameter.
- Since:
- 14.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AnnotatedTypeprivate final ImmutableList<Annotation>private final Invokable<?,?> private final intprivate final TypeToken<?> -
Constructor Summary
ConstructorsConstructorDescriptionParameter(Invokable<?, ?> declaration, int position, TypeToken<?> type, Annotation[] annotations, AnnotatedType annotatedType) -
Method Summary
Modifier and TypeMethodDescriptionboolean<A extends Annotation>
AgetAnnotation(Class<A> annotationType) <A extends Annotation>
A[]getAnnotationsByType(Class<A> annotationType) <A extends Annotation>
AgetDeclaredAnnotation(Class<A> annotationType) <A extends Annotation>
A[]getDeclaredAnnotationsByType(Class<A> annotationType) Invokable<?,?> Returns theInvokablethat declares this parameter.TypeToken<?>getType()Returns the type of the parameter.inthashCode()booleanisAnnotationPresent(Class<? extends Annotation> annotationType) toString()
-
Field Details
-
declaration
-
position
private final int position -
type
-
annotations
-
annotatedType
-
-
Constructor Details
-
Parameter
Parameter(Invokable<?, ?> declaration, int position, TypeToken<?> type, Annotation[] annotations, AnnotatedType annotatedType)
-
-
Method Details
-
getType
Returns the type of the parameter. -
getDeclaringInvokable
Returns theInvokablethat declares this parameter. -
isAnnotationPresent
- Specified by:
isAnnotationPresentin interfaceAnnotatedElement
-
getAnnotation
- Specified by:
getAnnotationin interfaceAnnotatedElement
-
getAnnotations
- Specified by:
getAnnotationsin interfaceAnnotatedElement
-
getAnnotationsByType
- Specified by:
getAnnotationsByTypein interfaceAnnotatedElement- Since:
- 18.0
-
getDeclaredAnnotations
- Specified by:
getDeclaredAnnotationsin interfaceAnnotatedElement- Since:
- 18.0
-
getDeclaredAnnotation
- Specified by:
getDeclaredAnnotationin interfaceAnnotatedElement- Since:
- 18.0
-
getDeclaredAnnotationsByType
- Specified by:
getDeclaredAnnotationsByTypein interfaceAnnotatedElement- Since:
- 18.0
-
getAnnotatedType
- Since:
- 25.1
-
equals
-
hashCode
public int hashCode() -
toString
-