Package io.determann.shadow.api.shadow
Interface Array
- All Superinterfaces:
ApiHolder,MirrorBacked<ArrayType>,Shadow<ArrayType>
- All Known Implementing Classes:
ArrayImpl
-
Method Summary
Modifier and TypeMethodDescriptionasArray()String[] -> String[][]booleanbe careful using this equalserasure()Information regarding generics is lost after the compilation.String[]returns Object[] for declared arrays and anIntersectionofjava.io.Serializable&java.lang.Cloneablefor primitivesbooleanisSubtypeOf(Shadow<? extends TypeMirror> shadow) returns true if this can be cast to that.Methods inherited from interface io.determann.shadow.api.shadow.Shadow
getApi, getMirror, getTypeKind, isTypeKind, representsSameType
-
Method Details
-
isSubtypeOf
returns true if this can be cast to that. This can be useful if you want to check if a shadow implements for example aCollectionshadowToTest.erasure().isSubtypeOf(shadowApi.getDeclaredOrThrow("java.util.Collection").erasure()) -
getComponentType
Shadow<TypeMirror> getComponentType()String[] -
getDirectSuperTypes
List<Shadow<TypeMirror>> getDirectSuperTypes()returns Object[] for declared arrays and anIntersectionofjava.io.Serializable&java.lang.Cloneablefor primitives -
erasure
Array 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
Arrays this means for exampleT[]->java.lang.Object[] -
asExtendsWildcard
Wildcard asExtendsWildcard() -
asSuperWildcard
Wildcard asSuperWildcard() -
asArray
Array asArray()String[] -> String[][] -
equals
be careful using this equals
-