Class TypeHierarchy.InheritedType
java.lang.Object
io.micronaut.sourcegen.model.TypeHierarchy.InheritedType
- Enclosing class:
TypeHierarchy
A type of the hierarchy with the type arguments it is inherited with.
- Since:
- 2.3
-
Method Summary
Modifier and TypeMethodDescriptionErases a type in the scope of this type.erase(TypeDef type, TypeHierarchy.InheritedType boundOwner) Erases a type in the scope of this type, taking the bounds of its type variables from another type - the declaring definition, for a type already substituted into its scope.getName()booleanisRaw()shadowedBy(List<TypeDef.TypeVariable> shadowed) The scope of a generic method of this type, whose variables shadow the type's variables of the same name.substitute(TypeDef type) Substitutes the type arguments this type is inherited with.substitute(TypeDef type, List<TypeDef.TypeVariable> shadowed) Substitutes the type arguments this type is inherited with, except for variables a generic method declares of its own, which shadow the type's variables of the same name.
-
Method Details
-
isRaw
public boolean isRaw()- Returns:
- Whether the type is inherited raw, directly or through a raw supertype: its members are erased, and its type variables are bound to nothing
-
getName
- Returns:
- The binary name
-
getPackageName
- Returns:
- The package name. A type named without one - a member type named by its simple name, as the definition the caller holds on to names it - is of the package of the definition whose hierarchy it is
-
getTypeParameters
-
getBounds
-
substitute
-
substitute
Substitutes the type arguments this type is inherited with, except for variables a generic method declares of its own, which shadow the type's variables of the same name.- Parameters:
type- A type in the scope of a method of this typeshadowed- The variables the method declares- Returns:
- The substituted type
- See Also:
-
shadowedBy
The scope of a generic method of this type, whose variables shadow the type's variables of the same name.- Parameters:
shadowed- The variables the method declares- Returns:
- The scope
-
erase
-
erase
Erases a type in the scope of this type, taking the bounds of its type variables from another type - the declaring definition, for a type already substituted into its scope.- Parameters:
type- The typeboundOwner- The type declaring the variables- Returns:
- The erased type
-