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 boolean
equals(Object obj)
AnnotatedType
getAnnotatedType()
Returns theAnnotatedType
of the parameter.<A extends Annotation>
AgetAnnotation(Class<A> annotationType)
Annotation[]
getAnnotations()
<A extends Annotation>
A[]getAnnotationsByType(Class<A> annotationType)
<A extends Annotation>
AgetDeclaredAnnotation(Class<A> annotationType)
Annotation[]
getDeclaredAnnotations()
<A extends Annotation>
A[]getDeclaredAnnotationsByType(Class<A> annotationType)
Invokable<?,?>
getDeclaringInvokable()
Returns theInvokable
that declares this parameter.TypeToken<?>
getType()
Returns the type of the parameter.int
hashCode()
boolean
isAnnotationPresent(Class<? extends Annotation> annotationType)
String
toString()
-
-
-
Method Detail
-
getDeclaringInvokable
public Invokable<?,?> getDeclaringInvokable()
Returns theInvokable
that declares this parameter.
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
- Specified by:
isAnnotationPresent
in interfaceAnnotatedElement
-
getAnnotation
@CheckForNull public <A extends Annotation> A getAnnotation(Class<A> annotationType)
- Specified by:
getAnnotation
in interfaceAnnotatedElement
-
getAnnotations
public Annotation[] getAnnotations()
- Specified by:
getAnnotations
in interfaceAnnotatedElement
-
getAnnotationsByType
public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType)
- Specified by:
getAnnotationsByType
in interfaceAnnotatedElement
- Since:
- 18.0
-
getDeclaredAnnotations
public Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotations
in interfaceAnnotatedElement
- Since:
- 18.0
-
getDeclaredAnnotation
@CheckForNull public <A extends Annotation> A getDeclaredAnnotation(Class<A> annotationType)
- Specified by:
getDeclaredAnnotation
in interfaceAnnotatedElement
- Since:
- 18.0
-
getDeclaredAnnotationsByType
public <A extends Annotation> A[] getDeclaredAnnotationsByType(Class<A> annotationType)
- Specified by:
getDeclaredAnnotationsByType
in interfaceAnnotatedElement
- Since:
- 18.0
-
getAnnotatedType
public AnnotatedType getAnnotatedType()
Returns theAnnotatedType
of the parameter.- Since:
- 25.1 for guava-jre
-
equals
public boolean equals(@CheckForNull Object obj)
-
-