Package com.tngtech.archunit.core.domain
Class JavaParameter
java.lang.Object
com.tngtech.archunit.core.domain.JavaParameter
- All Implemented Interfaces:
HasDescription
,CanBeAnnotated
,HasAnnotations<JavaParameter>
,HasOwner<JavaCodeUnit>
,HasType
@PublicAPI(usage=ACCESS) public final class JavaParameter extends java.lang.Object implements HasType, HasOwner<JavaCodeUnit>, HasAnnotations<JavaParameter>
A parameter of a
JavaCodeUnit
, i.e. encapsulates the raw parameter type, the (possibly) generic
parameter type and any annotations this parameter has.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tngtech.archunit.core.domain.properties.CanBeAnnotated
CanBeAnnotated.Predicates, CanBeAnnotated.Utils
Nested classes/interfaces inherited from interface com.tngtech.archunit.core.domain.properties.HasOwner
HasOwner.Functions, HasOwner.Predicates
Nested classes/interfaces inherited from interface com.tngtech.archunit.core.domain.properties.HasType
HasType.Functions, HasType.Predicates
-
Method Summary
Modifier and Type Method Description <A extends java.lang.annotation.Annotation>
AgetAnnotationOfType(java.lang.Class<A> type)
JavaAnnotation<JavaParameter>
getAnnotationOfType(java.lang.String typeName)
java.util.Set<JavaAnnotation<JavaParameter>>
getAnnotations()
java.lang.String
getDescription()
int
getIndex()
JavaCodeUnit
getOwner()
JavaClass
getRawType()
JavaType
getType()
boolean
isAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate)
boolean
isAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
boolean
isAnnotatedWith(java.lang.String annotationTypeName)
boolean
isMetaAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate)
boolean
isMetaAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
boolean
isMetaAnnotatedWith(java.lang.String annotationTypeName)
java.lang.String
toString()
<A extends java.lang.annotation.Annotation>
Optional<A>tryGetAnnotationOfType(java.lang.Class<A> type)
Optional<JavaAnnotation<JavaParameter>>
tryGetAnnotationOfType(java.lang.String typeName)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Method Details
-
getOwner
- Specified by:
getOwner
in interfaceHasOwner<JavaCodeUnit>
- Returns:
- The "owner" of this object, compare
HasOwner
-
getIndex
-
getType
-
getRawType
- Specified by:
getRawType
in interfaceHasType
-
isAnnotatedWith
public boolean isAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)- Specified by:
isAnnotatedWith
in interfaceCanBeAnnotated
-
isAnnotatedWith
public boolean isAnnotatedWith(java.lang.String annotationTypeName)- Specified by:
isAnnotatedWith
in interfaceCanBeAnnotated
-
isAnnotatedWith
- Specified by:
isAnnotatedWith
in interfaceCanBeAnnotated
-
isMetaAnnotatedWith
public boolean isMetaAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)- Specified by:
isMetaAnnotatedWith
in interfaceCanBeAnnotated
-
isMetaAnnotatedWith
public boolean isMetaAnnotatedWith(java.lang.String annotationTypeName)- Specified by:
isMetaAnnotatedWith
in interfaceCanBeAnnotated
-
isMetaAnnotatedWith
- Specified by:
isMetaAnnotatedWith
in interfaceCanBeAnnotated
-
getAnnotations
- Specified by:
getAnnotations
in interfaceHasAnnotations<JavaParameter>
-
getAnnotationOfType
public <A extends java.lang.annotation.Annotation> A getAnnotationOfType(java.lang.Class<A> type)- Specified by:
getAnnotationOfType
in interfaceHasAnnotations<JavaParameter>
-
getAnnotationOfType
- Specified by:
getAnnotationOfType
in interfaceHasAnnotations<JavaParameter>
-
tryGetAnnotationOfType
public <A extends java.lang.annotation.Annotation> Optional<A> tryGetAnnotationOfType(java.lang.Class<A> type)- Specified by:
tryGetAnnotationOfType
in interfaceHasAnnotations<JavaParameter>
-
tryGetAnnotationOfType
- Specified by:
tryGetAnnotationOfType
in interfaceHasAnnotations<JavaParameter>
-
getDescription
- Specified by:
getDescription
in interfaceHasDescription
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-