- java.lang.Object
-
- net.kemuri9.type.AnnotatedElementImpl
-
- net.kemuri9.type.AnnotatedTypeImpl
-
- net.kemuri9.type.AnnotatedArrayTypeImpl
-
- All Implemented Interfaces:
AnnotatedArrayType,AnnotatedElement,AnnotatedType
public final class AnnotatedArrayTypeImpl extends AnnotatedTypeImpl implements AnnotatedArrayType
Implementation ofAnnotatedArrayType.AnnotatedArrayTyperepresents an annotated arrayClassor an annotatedGenericArrayType.
-
-
Field Summary
-
Fields inherited from class net.kemuri9.type.AnnotatedElementImpl
annotations, EMPTY_ANNS
-
Fields inherited from class net.kemuri9.type.AnnotatedTypeImpl
ownerType, type
-
-
Constructor Summary
Constructors Constructor Description AnnotatedArrayTypeImpl(AnnotatedArrayType type)Create anAnnotatedArrayTypeImplfrom an existingAnnotatedArrayTypeAnnotatedArrayTypeImpl(Type type)Create a newAnnotatedArrayTypeImplfor the specifiedTypeAnnotatedArrayTypeImpl(Type type, Annotation... typeAnnotations)Create a newAnnotatedArrayTypeImplfrom the specified parameters.AnnotatedArrayTypeImpl(Type type, Annotation[] arrayTypeAnns, Annotation... componentTypeAnns)Create anAnnotatedArrayTypeImplfrom the specified parametersAnnotatedArrayTypeImpl(Type type, Annotation[] typeAnnotations, AnnotatedType componentType)Create anAnnotatedArrayTypeImplfrom the specified parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckType(String name)Perform validations against theAnnotatedTypeImpl.typefieldbooleanequals(Object other)AnnotatedTypegetAnnotatedGenericComponentType()inthashCode()StringtoString()-
Methods inherited from interface java.lang.reflect.AnnotatedArrayType
getAnnotatedOwnerType
-
Methods inherited from interface java.lang.reflect.AnnotatedElement
getAnnotation, getAnnotations, getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredAnnotationsByType, isAnnotationPresent
-
Methods inherited from class net.kemuri9.type.AnnotatedElementImpl
getAnnotation, getAnnotations, getDeclaredAnnotations
-
Methods inherited from interface java.lang.reflect.AnnotatedType
getType
-
Methods inherited from class net.kemuri9.type.AnnotatedTypeImpl
getAnnotatedOwnerType, getType
-
-
-
-
Constructor Detail
-
AnnotatedArrayTypeImpl
public AnnotatedArrayTypeImpl(AnnotatedArrayType type)
Create anAnnotatedArrayTypeImplfrom an existingAnnotatedArrayType- Parameters:
type-AnnotatedArrayTypeto copy parameters from.- Throws:
IllegalArgumentException-- When
typeis invalid - When
type.getType()is not an arrayClassand not aGenericArrayType - When
type.getAnnotatedGenericComponentType()isnull - When
type.getAnnotatedGenericComponentType()does not matchtype.getType()'s component type
- When
- See Also:
AnnotatedTypeImpl(AnnotatedType)
-
AnnotatedArrayTypeImpl
public AnnotatedArrayTypeImpl(Type type)
Create a newAnnotatedArrayTypeImplfor the specifiedType- Parameters:
type-Typeto decorate as an undecoratedAnnotatedArrayType- Throws:
IllegalArgumentException-- When
typeisnull - When
typeis aClassand is not an array type - When
typeis not aClassand not aGenericArrayType
- When
-
AnnotatedArrayTypeImpl
public AnnotatedArrayTypeImpl(Type type, Annotation... typeAnnotations)
Create a newAnnotatedArrayTypeImplfrom the specified parameters.- Parameters:
type-Typeto annotatetypeAnnotations-Annotations to annotatetypewith- Throws:
IllegalArgumentException-- When
typeis invalid - When
typeAnnotationscontains anull
- When
- See Also:
AnnotatedArrayTypeImpl(Type)
-
AnnotatedArrayTypeImpl
public AnnotatedArrayTypeImpl(Type type, Annotation[] typeAnnotations, AnnotatedType componentType)
Create anAnnotatedArrayTypeImplfrom the specified parameters- Parameters:
type-Typeindicating the array type orGenericArrayTypethat is annotatedtypeAnnotations-Annotations that annotate the array typecomponentType-AnnotatedTypeindicating the annotated component of the array- Throws:
IllegalArgumentException-- When
typeis invalid - When
typeAnnotationscontains anull - When
componentTypeisnull - When
type's component type does not equalcomponentType's type
- When
- See Also:
AnnotatedArrayTypeImpl(Type)
-
AnnotatedArrayTypeImpl
public AnnotatedArrayTypeImpl(Type type, Annotation[] arrayTypeAnns, Annotation... componentTypeAnns)
Create anAnnotatedArrayTypeImplfrom the specified parameters- Parameters:
type-Typeindicating the array type orGenericArrayTypethat is annotatedarrayTypeAnns-Annotations that annotate the array typecomponentTypeAnns-Annotations that annotate the array's component type.- Throws:
IllegalArgumentException-- When
arrayTypeisnull - When
arrayTypeis not an arrayClassand not aGenericArrayType - When
arrayTypeAnnscontains anull - When
componentTypeAnnscontains anull
- When
-
-
Method Detail
-
checkType
protected void checkType(String name)
Description copied from class:AnnotatedTypeImplPerform validations against theAnnotatedTypeImpl.typefield- Overrides:
checkTypein classAnnotatedTypeImpl- Parameters:
name- name of the source of theAnnotatedTypeImpl.typefield
-
equals
public boolean equals(Object other)
- Overrides:
equalsin classAnnotatedTypeImpl
-
getAnnotatedGenericComponentType
public AnnotatedType getAnnotatedGenericComponentType()
- Specified by:
getAnnotatedGenericComponentTypein interfaceAnnotatedArrayType
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAnnotatedTypeImpl
-
toString
public String toString()
- Overrides:
toStringin classAnnotatedTypeImpl
-
-