Package org.springframework.aot.hint
Interface TypeReference
- All Superinterfaces:
Comparable<TypeReference>
- All Known Implementing Classes:
AbstractTypeReference
,GeneratedTypeReference
Type abstraction that can be used to refer to types that are not available as
a
Class
yet.- Since:
- 6.0
- Author:
- Stephane Nicoll, Sebastien Deleuze
-
Method Summary
Modifier and TypeMethodDescriptionReturn the canonical name of this type reference.Return the enclosing type reference, ornull
if this type reference does not have an enclosing type.getName()
Return the fully qualified name of this type reference.Return the package name of this type.Return the simple name of this type reference.static List<TypeReference>
Create a list oftype references
mapped by the specified types.static TypeReference
Create an instance based on the specified type.static TypeReference
Create an instance based on the specified class name.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getName
String getName()Return the fully qualified name of this type reference.- Returns:
- the reflection target name
-
getCanonicalName
String getCanonicalName()Return the canonical name of this type reference.- Returns:
- the canonical name
-
getPackageName
String getPackageName()Return the package name of this type.- Returns:
- the package name
-
getSimpleName
String getSimpleName()Return the simple name of this type reference.- Returns:
- the simple name
-
getEnclosingType
Return the enclosing type reference, ornull
if this type reference does not have an enclosing type.- Returns:
- the enclosing type, if any
-
of
Create an instance based on the specified type.- Parameters:
type
- the type to wrap- Returns:
- a type reference for the specified type
- Throws:
IllegalArgumentException
- if the specified type canonical name isnull
-
of
Create an instance based on the specified class name. The format of the class name must follow Class.getName(), in particular inner classes should be separated by a$
.- Parameters:
className
- the class name of the type to wrap- Returns:
- a type reference for the specified class name
-
listOf
Create a list oftype references
mapped by the specified types.- Parameters:
types
- the types to map- Returns:
- a list of type references
-