Package io.determann.shadow.api.shadow
Interface Generic
- All Superinterfaces:
Annotationable<TypeParameterElement>,ApiHolder,ElementBacked<TypeParameterElement>,MirrorBacked<TypeVariable>,Modifiable,Shadow<TypeVariable>
- All Known Implementing Classes:
GenericImpl
represents the generic parameter at a class, method, constructor etc.
-
Method Summary
Methods inherited from interface io.determann.shadow.api.Annotationable
getAnnotationUsages, getDirectAnnotationUsages, getDirectUsageOf, getDirectUsageOfOrThrow, getDirectUsagesOf, getUsageOf, getUsageOfOrThrow, getUsagesOf, isAnnotatedWith, isDirectlyAnnotatedWithMethods inherited from interface io.determann.shadow.api.ElementBacked
getElement, getJavaDoc, getModifiers, getModule, getSimpleName, logError, logInfo, logWarningMethods inherited from interface io.determann.shadow.api.modifier.Modifiable
hasModifierMethods inherited from interface io.determann.shadow.api.shadow.Shadow
getApi, getMirror, getTypeKind, isTypeKind, representsSameType
-
Method Details
-
getExtends
Shadow<TypeMirror> getExtends()- See Also:
-
getSuper
Shadow<TypeMirror> getSuper()There is no way to explicitly declare super in a generic. Mostly relevant in the context ofClass.interpolateGenerics() -
getEnclosing
Shadow<TypeMirror> getEnclosing()returns the class, method constructor etc. this is the generic for -
getPackage
Package getPackage() -
erasure
Shadow<TypeMirror> erasure()Information regarding generics is lost after the compilation. For ExampleList<String>becomesList. This method Does the same. This can be useful if you want to check if a shadow implements for exampleCollectionshadowToTest.erasure().isSubtypeOf(shadowApi.getDeclaredOrThrow("java.util.Collection").erasure())for
Generics this means for exampleT extends Number->Number -
equals
be careful using this equals- Specified by:
equalsin interfaceShadow<TypeVariable>- Overrides:
equalsin classObject- See Also:
-