Package io.determann.shadow.impl.shadow
Class GenericImpl
java.lang.Object
io.determann.shadow.impl.shadow.ShadowImpl<TypeVariable>
io.determann.shadow.impl.shadow.GenericImpl
- All Implemented Interfaces:
Annotationable<TypeParameterElement>,ApiHolder,ElementBacked<TypeParameterElement>,MirrorBacked<TypeVariable>,Modifiable,Generic,Shadow<TypeVariable>
-
Constructor Summary
ConstructorsConstructorDescriptionGenericImpl(ShadowApi shadowApi, TypeParameterElement typeParameterElement) GenericImpl(ShadowApi shadowApi, TypeVariable typeMirror) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbe careful using this equalserasure()Information regarding generics is lost after the compilation.returns the class, method constructor etc. this is the generic forgetSuper()There is no way to explicitly declare super in a generic.inthashCode()toString()Methods inherited from class io.determann.shadow.impl.shadow.ShadowImpl
getApi, getMirror, isTypeKind, representsSameTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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
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, isTypeKind, representsSameType
-
Constructor Details
-
GenericImpl
-
GenericImpl
-
-
Method Details
-
getExtends
- Specified by:
getExtendsin interfaceGeneric- See Also:
-
getSuper
Description copied from interface:GenericThere is no way to explicitly declare super in a generic. Mostly relevant in the context ofClass.interpolateGenerics() -
getEnclosing
Description copied from interface:Genericreturns the class, method constructor etc. this is the generic for- Specified by:
getEnclosingin interfaceGeneric
-
getTypeKind
- Specified by:
getTypeKindin interfaceShadow<TypeVariable>
-
getPackage
- Specified by:
getPackagein interfaceGeneric
-
erasure
Description copied from interface:GenericInformation 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 -
getElement
- Specified by:
getElementin interfaceElementBacked<TypeParameterElement>
-
toString
- Overrides:
toStringin classShadowImpl<TypeVariable>
-
hashCode
public int hashCode() -
equals
Description copied from interface:Genericbe careful using this equals
-