Package io.determann.shadow.api.shadow
Interface Primitive
- All Superinterfaces:
ApiHolder,MirrorBacked<PrimitiveType>,Shadow<PrimitiveType>
- All Known Implementing Classes:
PrimitiveImpl
represents primitive types, but not there wrapper classes. for example int, long, short
-
Method Summary
Modifier and TypeMethodDescriptionasArray()int -> int[]asBoxed()int -> Integer
long -> Long etc...booleanbe careful using this equalsbooleanisAssignableFrom(Shadow<? extends TypeMirror> shadow) Equivalent toisSubtypeOf(Shadow)except for primitives.booleanisSubtypeOf(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()) -
isAssignableFrom
Equivalent toisSubtypeOf(Shadow)except for primitives. if one is a primitive and the other is not it tries to convert them -
asBoxed
Class asBoxed()int -> Integer
long -> Long etc... -
asArray
Array asArray()int -> int[] -
equals
be careful using this equals- Specified by:
equalsin interfaceShadow<PrimitiveType>- Overrides:
equalsin classObject- See Also:
-