- 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
.AnnotatedArrayType
represents an annotated arrayClass
or 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 anAnnotatedArrayTypeImpl
from an existingAnnotatedArrayType
AnnotatedArrayTypeImpl(Type type)
Create a newAnnotatedArrayTypeImpl
for the specifiedType
AnnotatedArrayTypeImpl(Type type, Annotation... typeAnnotations)
Create a newAnnotatedArrayTypeImpl
from the specified parameters.AnnotatedArrayTypeImpl(Type type, Annotation[] arrayTypeAnns, Annotation... componentTypeAnns)
Create anAnnotatedArrayTypeImpl
from the specified parametersAnnotatedArrayTypeImpl(Type type, Annotation[] typeAnnotations, AnnotatedType componentType)
Create anAnnotatedArrayTypeImpl
from the specified parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkType(String name)
Perform validations against theAnnotatedTypeImpl.type
fieldboolean
equals(Object other)
AnnotatedType
getAnnotatedGenericComponentType()
int
hashCode()
String
toString()
-
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 anAnnotatedArrayTypeImpl
from an existingAnnotatedArrayType
- Parameters:
type
-AnnotatedArrayType
to copy parameters from.- Throws:
IllegalArgumentException
-- When
type
is invalid - When
type.
getType()
is not an arrayClass
and 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 newAnnotatedArrayTypeImpl
for the specifiedType
- Parameters:
type
-Type
to decorate as an undecoratedAnnotatedArrayType
- Throws:
IllegalArgumentException
-- When
type
isnull
- When
type
is aClass
and is not an array type - When
type
is not aClass
and not aGenericArrayType
- When
-
AnnotatedArrayTypeImpl
public AnnotatedArrayTypeImpl(Type type, Annotation... typeAnnotations)
Create a newAnnotatedArrayTypeImpl
from the specified parameters.- Parameters:
type
-Type
to annotatetypeAnnotations
-Annotation
s to annotatetype
with- Throws:
IllegalArgumentException
-- When
type
is invalid - When
typeAnnotations
contains anull
- When
- See Also:
AnnotatedArrayTypeImpl(Type)
-
AnnotatedArrayTypeImpl
public AnnotatedArrayTypeImpl(Type type, Annotation[] typeAnnotations, AnnotatedType componentType)
Create anAnnotatedArrayTypeImpl
from the specified parameters- Parameters:
type
-Type
indicating the array type orGenericArrayType
that is annotatedtypeAnnotations
-Annotation
s that annotate the array typecomponentType
-AnnotatedType
indicating the annotated component of the array- Throws:
IllegalArgumentException
-- When
type
is invalid - When
typeAnnotations
contains anull
- When
componentType
isnull
- 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 anAnnotatedArrayTypeImpl
from the specified parameters- Parameters:
type
-Type
indicating the array type orGenericArrayType
that is annotatedarrayTypeAnns
-Annotation
s that annotate the array typecomponentTypeAnns
-Annotation
s that annotate the array's component type.- Throws:
IllegalArgumentException
-- When
arrayType
isnull
- When
arrayType
is not an arrayClass
and not aGenericArrayType
- When
arrayTypeAnns
contains anull
- When
componentTypeAnns
contains anull
- When
-
-
Method Detail
-
checkType
protected void checkType(String name)
Description copied from class:AnnotatedTypeImpl
Perform validations against theAnnotatedTypeImpl.type
field- Overrides:
checkType
in classAnnotatedTypeImpl
- Parameters:
name
- name of the source of theAnnotatedTypeImpl.type
field
-
equals
public boolean equals(Object other)
- Overrides:
equals
in classAnnotatedTypeImpl
-
getAnnotatedGenericComponentType
public AnnotatedType getAnnotatedGenericComponentType()
- Specified by:
getAnnotatedGenericComponentType
in interfaceAnnotatedArrayType
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAnnotatedTypeImpl
-
toString
public String toString()
- Overrides:
toString
in classAnnotatedTypeImpl
-
-