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 SummaryAll 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- 
getDeclaringInvokablepublic Invokable<?,?> getDeclaringInvokable() Returns theInvokablethat declares this parameter.
 - 
isAnnotationPresentpublic boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType) - Specified by:
- isAnnotationPresentin interface- java.lang.reflect.AnnotatedElement
 
 - 
getAnnotation@CheckForNull public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationType) - Specified by:
- getAnnotationin interface- java.lang.reflect.AnnotatedElement
 
 - 
getAnnotationspublic java.lang.annotation.Annotation[] getAnnotations() - Specified by:
- getAnnotationsin interface- java.lang.reflect.AnnotatedElement
 
 - 
getAnnotationsByTypepublic <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(java.lang.Class<A> annotationType) - Specified by:
- getAnnotationsByTypein interface- java.lang.reflect.AnnotatedElement
- Since:
- 18.0
 
 - 
getDeclaredAnnotationspublic java.lang.annotation.Annotation[] getDeclaredAnnotations() - Specified by:
- getDeclaredAnnotationsin interface- java.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 interface- java.lang.reflect.AnnotatedElement
- Since:
- 18.0
 
 - 
getDeclaredAnnotationsByTypepublic <A extends java.lang.annotation.Annotation> A[] getDeclaredAnnotationsByType(java.lang.Class<A> annotationType) - Specified by:
- getDeclaredAnnotationsByTypein interface- java.lang.reflect.AnnotatedElement
- Since:
- 18.0
 
 - 
getAnnotatedTypepublic java.lang.reflect.AnnotatedType getAnnotatedType() Returns theAnnotatedTypeof the parameter.- Since:
- 25.1 for guava-jre
 
 - 
equalspublic boolean equals(@CheckForNull java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-