Package com.google.common.reflect
Class Parameter
- java.lang.Object
 - 
- com.google.common.reflect.Parameter
 
 
- 
- All Implemented Interfaces:
 java.lang.reflect.AnnotatedElement
public final class Parameter extends java.lang.Object implements java.lang.reflect.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(java.lang.Object obj)java.lang.reflect.AnnotatedTypegetAnnotatedType()Returns theAnnotatedTypeof the parameter.<A extends java.lang.annotation.Annotation>
AgetAnnotation(java.lang.Class<A> annotationType)java.lang.annotation.Annotation[]getAnnotations()<A extends java.lang.annotation.Annotation>
A[]getAnnotationsByType(java.lang.Class<A> annotationType)<A extends java.lang.annotation.Annotation>
AgetDeclaredAnnotation(java.lang.Class<A> annotationType)java.lang.annotation.Annotation[]getDeclaredAnnotations()<A extends java.lang.annotation.Annotation>
A[]getDeclaredAnnotationsByType(java.lang.Class<A> annotationType)Invokable<?,?>getDeclaringInvokable()Returns theInvokablethat declares this parameter.TypeToken<?>getType()Returns the type of the parameter.inthashCode()booleanisAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)java.lang.StringtoString() 
 - 
 
- 
- 
Method Detail
- 
getDeclaringInvokable
public Invokable<?,?> getDeclaringInvokable()
Returns theInvokablethat declares this parameter. 
- 
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
- Specified by:
 isAnnotationPresentin interfacejava.lang.reflect.AnnotatedElement
 
- 
getAnnotation
@CheckForNull public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationType)
- Specified by:
 getAnnotationin interfacejava.lang.reflect.AnnotatedElement
 
- 
getAnnotations
public java.lang.annotation.Annotation[] getAnnotations()
- Specified by:
 getAnnotationsin interfacejava.lang.reflect.AnnotatedElement
 
- 
getAnnotationsByType
public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(java.lang.Class<A> annotationType)
- Specified by:
 getAnnotationsByTypein interfacejava.lang.reflect.AnnotatedElement- Since:
 - 18.0
 
 
- 
getDeclaredAnnotations
public java.lang.annotation.Annotation[] getDeclaredAnnotations()
- Specified by:
 getDeclaredAnnotationsin interfacejava.lang.reflect.AnnotatedElement- Since:
 - 18.0
 
 
- 
getDeclaredAnnotation
@CheckForNull public <A extends java.lang.annotation.Annotation> A getDeclaredAnnotation(java.lang.Class<A> annotationType)
- Specified by:
 getDeclaredAnnotationin interfacejava.lang.reflect.AnnotatedElement- Since:
 - 18.0
 
 
- 
getDeclaredAnnotationsByType
public <A extends java.lang.annotation.Annotation> A[] getDeclaredAnnotationsByType(java.lang.Class<A> annotationType)
- Specified by:
 getDeclaredAnnotationsByTypein interfacejava.lang.reflect.AnnotatedElement- Since:
 - 18.0
 
 
- 
getAnnotatedType
public java.lang.reflect.AnnotatedType getAnnotatedType()
Returns theAnnotatedTypeof the parameter.This method will fail if run under an Android VM.
- Since:
 - 25.1 for guava-jre (available since 32.0.0 in guava-android)
 
 
- 
equals
public boolean equals(@CheckForNull java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -