Class ArrayImpl

java.lang.Object
io.determann.shadow.impl.shadow.ShadowImpl<ArrayType>
io.determann.shadow.impl.shadow.ArrayImpl
All Implemented Interfaces:
ApiHolder, MirrorBacked<ArrayType>, Array, Shadow<ArrayType>

public final class ArrayImpl extends ShadowImpl<ArrayType> implements Array
  • Constructor Details

  • Method Details

    • isSubtypeOf

      public boolean isSubtypeOf(Shadow<? extends TypeMirror> shadow)
      Description copied from interface: Array
      returns true if this can be cast to that. This can be useful if you want to check if a shadow implements for example a Collection shadowToTest.erasure().isSubtypeOf(shadowApi.getDeclaredOrThrow("java.util.Collection").erasure())
      Specified by:
      isSubtypeOf in interface Array
    • getComponentType

      public Shadow<TypeMirror> getComponentType()
      Description copied from interface: Array
      String[]
      Specified by:
      getComponentType in interface Array
    • getDirectSuperTypes

      public List<Shadow<TypeMirror>> getDirectSuperTypes()
      Description copied from interface: Array
      returns Object[] for declared arrays and an Intersection of java.io.Serializable&java.lang.Cloneable for primitives
      Specified by:
      getDirectSuperTypes in interface Array
    • erasure

      public Array erasure()
      Description copied from interface: Array
      Information regarding generics is lost after the compilation. For Example List<String> becomes List. This method Does the same. This can be useful if you want to check if a shadow implements for example Collection shadowToTest.erasure().isSubtypeOf(shadowApi.getDeclaredOrThrow("java.util.Collection").erasure())

      for Arrays this means for example T[] -> java.lang.Object[]

      Specified by:
      erasure in interface Array
    • asExtendsWildcard

      public Wildcard asExtendsWildcard()
      Specified by:
      asExtendsWildcard in interface Array
    • asSuperWildcard

      public Wildcard asSuperWildcard()
      Specified by:
      asSuperWildcard in interface Array
    • asArray

      public Array asArray()
      Description copied from interface: Array
      String[] -> String[][]
      Specified by:
      asArray in interface Array
    • getTypeKind

      public TypeKind getTypeKind()
      Specified by:
      getTypeKind in interface Shadow<ArrayType>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Description copied from interface: Array
      be careful using this equals
      Specified by:
      equals in interface Array
      Specified by:
      equals in interface Shadow<ArrayType>
      Overrides:
      equals in class Object
      See Also: