public interface TypeMirrorUtilities
TypeMirrorUtilities is a collection of useful methods for dealing with TypeMirrors.| Modifier and Type | Method and Description |
|---|---|
default Map<TypeMirror,String> |
getMap(Source map)
|
default <_Type_> Class<_Type_> |
getType(Supplier<Class<?>> supplier)
Resolves a possibly type-mirrored
Class. |
default TypeMirror |
getTypeMirror(Supplier<Class<?>> supplier)
Converts a
Class into a TypeMirror. |
default TypeMirror getTypeMirror(Supplier<Class<?>> supplier)
Class into a TypeMirror.supplier - a method that returns the Class (as the Class itself will not
work during annotation processing)TypeMirrordefault <_Type_> Class<_Type_> getType(Supplier<Class<?>> supplier)
Class. If the class is indeed type-mirrored, this
method will first construct the TypeMirror and then use the type name to create the
corresponding Class object. If the class is not type-mirrored the method will simply
return the Class object provided by the Supplier._Type_ - the type represented by the classsupplier - a possibly type-mirrored Class SupplierClass (constructed directly, or via an intermediate TypeMirror if necessary)default Map<TypeMirror,String> getMap(Source map)
map - the Interface annotation instanceTypeMirrors to class namesCopyright © 2022. All rights reserved.