Package io.determann.shadow.impl.shadow
Class PrimitiveImpl
java.lang.Object
io.determann.shadow.impl.shadow.ShadowImpl<PrimitiveType>
io.determann.shadow.impl.shadow.PrimitiveImpl
- All Implemented Interfaces:
ApiHolder,MirrorBacked<PrimitiveType>,Primitive,Shadow<PrimitiveType>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasArray()int -> int[]asBoxed()int -> Integer
long -> Long etc...booleanbe careful using this equalsinthashCode()booleanisAssignableFrom(Shadow<? extends TypeMirror> shadow) Equivalent toPrimitive.isSubtypeOf(Shadow)except for primitives.booleanisSubtypeOf(Shadow<? extends TypeMirror> shadow) returns true if this can be cast to that.Methods inherited from class io.determann.shadow.impl.shadow.ShadowImpl
getApi, getMirror, isTypeKind, representsSameType, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.determann.shadow.api.shadow.Shadow
getApi, getMirror, isTypeKind, representsSameType
-
Constructor Details
-
PrimitiveImpl
-
-
Method Details
-
isSubtypeOf
Description copied from interface:Primitivereturns 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())- Specified by:
isSubtypeOfin interfacePrimitive
-
isAssignableFrom
Description copied from interface:PrimitiveEquivalent toPrimitive.isSubtypeOf(Shadow)except for primitives. if one is a primitive and the other is not it tries to convert them- Specified by:
isAssignableFromin interfacePrimitive
-
asBoxed
Description copied from interface:Primitiveint -> Integer
long -> Long etc... -
asArray
Description copied from interface:Primitiveint -> int[] -
getTypeKind
- Specified by:
getTypeKindin interfaceShadow<PrimitiveType>
-
hashCode
public int hashCode() -
equals
Description copied from interface:Primitivebe careful using this equals
-