Package io.determann.shadow.api.shadow
Interface Shadow<MIRROR extends TypeMirror>
- All Superinterfaces:
ApiHolder,MirrorBacked<MIRROR>
- All Known Subinterfaces:
Annotation,AnnotationUsage,Array,Class,Constructor,Declared,Enum,EnumConstant,Executable,Field,Generic,Interface,Intersection,Method,Module,Null,Package,Parameter,Primitive,Record,RecordComponent,Variable<SURROUNDING>,Void,Wildcard
- All Known Implementing Classes:
AnnotationUsageImpl,ArrayImpl,ClassImpl,DeclaredImpl,EnumConstantImpl,ExecutableImpl,FieldImpl,GenericImpl,InterfaceImpl,IntersectionImpl,ModuleImpl,NullImpl,PackageImpl,ParameterImpl,PrimitiveImpl,RecordComponentImpl,RecordImpl,ShadowImpl,VariableImpl,VoidImpl,WildcardImpl
Represents sourceCode that is being complied. A
subtypes
Shadow can be converted only in one of its children using
ShadowApi.convert(Shadow). Every Shadow has a TypeKind indicating its Type.
TypeKind.ARRAY -> Array. To check for equality use representsSameType(Shadow).
subtypes
Declaredanything that can be a fileArrayExecutableany code blockIntersectionT extendsCollection & Serializable>VoidModulePackageRecordComponentNullPrimitiveGenericGenericsWildcardList<? extends Number>VariableEnumConstantFieldParameterof a Method or Constructor
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbe careful using this equalsgetApi()booleanisTypeKind(TypeKind typeKind) booleanrepresentsSameType(Shadow<? extends TypeMirror> shadow) type equals from the compiler perspective. for example ?
-
Method Details
-
getTypeKind
TypeKind getTypeKind() -
isTypeKind
-
representsSameType
type equals from the compiler perspective. for example ? does not equal ? for the compiler. use this method to compareShadows when ever possible.equals(Object)should only be used to compare the technical aspect of two objects. for example in a list implementation. -
getMirror
MIRROR getMirror()- Specified by:
getMirrorin interfaceMirrorBacked<MIRROR extends TypeMirror>
-
getApi
ShadowApi getApi() -
equals
be careful using this equals
-