java.lang.Object
io.quarkus.gizmo2.GenericType
io.quarkus.gizmo2.GenericType.OfReference
io.quarkus.gizmo2.GenericType.OfThrows
io.quarkus.gizmo2.GenericType.OfClass
- Direct Known Subclasses:
GenericType.OfInnerClass,GenericType.OfRootClass
- Enclosing class:
- GenericType
A generic type of a class or interface (including specialized cases: enums, records, or annotations).
Includes all of non-generic class types, parameterized types (generic class types with type arguments)
and raw types (generic class types without type arguments).
-
Nested Class Summary
Nested classes/interfaces inherited from class io.quarkus.gizmo2.GenericType
GenericType.OfArray, GenericType.OfClass, GenericType.OfInnerClass, GenericType.OfPrimitive, GenericType.OfReference, GenericType.OfRootClass, GenericType.OfThrows, GenericType.OfTypeVariable -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(GenericType.OfClass other) Returnstrueif this object is equal to the given object, orfalseif it is not.final booleanequals(GenericType.OfThrows other) Returnstrueif this object is equal to the given object, orfalseif it is not.inthashCode()Returns the hash code of this generic type.booleanReturnstrueif this type has runtime-invisible type annotations, orfalseif it does not.booleanReturnstrueif this type has runtime-visible type annotations, orfalseif it does not.booleanisRaw()Returnstrueif this type has no type arguments, orfalseif it has type arguments.Returns the list of type arguments (notnull).<A extends Annotation>
GenericType.OfClasswithAnnotation(Class<A> annotationType) Returns this generic type with the given additional annotation (notnull).<A extends Annotation>
GenericType.OfClasswithAnnotation(Class<A> annotationType, Consumer<AnnotationCreator<A>> builder) Returns this generic type with the given additional annotation (notnull).withAnnotations(Consumer<AnnotatableCreator> builder) Returns this generic type with annotations added by the given builder (notnull).withArguments(List<TypeArgument> newArguments) Returns a copy of this generic type with the given type arguments.Methods inherited from class io.quarkus.gizmo2.GenericType.OfThrows
equalsMethods inherited from class io.quarkus.gizmo2.GenericType.OfReference
equalsMethods inherited from class io.quarkus.gizmo2.GenericType
arrayType, desc, equals, hasAnnotations, hasAnnotations, of, of, of, of, ofArray, ofArray, ofClass, ofClass, ofClass, ofClass, ofClass, ofClass, ofInnerClass, ofPrimitive, ofPrimitive, ofTypeVariable, ofTypeVariable, ofTypeVariable, signatureNeeded, toString, toString
-
Method Details
-
typeArguments
Returns the list of type arguments (notnull).- Returns:
- the list of type arguments (not
null)
-
withAnnotations
Description copied from class:GenericTypeReturns this generic type with annotations added by the given builder (notnull).- Overrides:
withAnnotationsin classGenericType.OfThrows- Parameters:
builder- the annotation builder (must not benull)- Returns:
- this generic type with annotations added by the given builder (not
null)
-
withAnnotation
Description copied from class:GenericTypeReturns this generic type with the given additional annotation (notnull).- Overrides:
withAnnotationin classGenericType.OfThrows- Parameters:
annotationType- the annotation type (must not benull)- Returns:
- this generic type with the given additional annotation (not
null)
-
withAnnotation
public <A extends Annotation> GenericType.OfClass withAnnotation(Class<A> annotationType, Consumer<AnnotationCreator<A>> builder) Description copied from class:GenericTypeReturns this generic type with the given additional annotation (notnull).- Overrides:
withAnnotationin classGenericType.OfThrows- Parameters:
annotationType- the annotation type (must not benull)builder- the builder for the given annotation type (must not benull)- Returns:
- this generic type with the given additional annotation (not
null)
-
isRaw
public boolean isRaw()Description copied from class:GenericTypeReturnstrueif this type has no type arguments, orfalseif it has type arguments.- Specified by:
isRawin classGenericType- Returns:
trueif this type has no type arguments, orfalseif it has type arguments
-
hasVisibleAnnotations
public boolean hasVisibleAnnotations()Description copied from class:GenericTypeReturnstrueif this type has runtime-visible type annotations, orfalseif it does not.- Overrides:
hasVisibleAnnotationsin classGenericType- Returns:
trueif this type has runtime-visible type annotations, orfalseif it does not
-
hasInvisibleAnnotations
public boolean hasInvisibleAnnotations()Description copied from class:GenericTypeReturnstrueif this type has runtime-invisible type annotations, orfalseif it does not.- Overrides:
hasInvisibleAnnotationsin classGenericType- Returns:
trueif this type has runtime-invisible type annotations, orfalseif it does not
-
withArguments
Returns a copy of this generic type with the given type arguments.- Parameters:
newArguments- the new type arguments (must not benull)- Returns:
- a copy of this generic type with the given type arguments
- Throws:
IllegalArgumentException- if this type has type arguments and the given number of arguments does not match the current number of arguments
-
equals
Description copied from class:GenericType.OfThrowsReturnstrueif this object is equal to the given object, orfalseif it is not.- Overrides:
equalsin classGenericType.OfThrows- Returns:
trueif this object is equal to the given object, orfalseif it is not
-
equals
Returnstrueif this object is equal to the given object, orfalseif it is not.- Returns:
trueif this object is equal to the given object, orfalseif it is not
-
hashCode
public int hashCode()Description copied from class:GenericTypeReturns the hash code of this generic type.- Overrides:
hashCodein classGenericType- Returns:
- the hash code of this generic type
-