Interface Array

All Superinterfaces:
ApiHolder, MirrorBacked<ArrayType>, Shadow<ArrayType>
All Known Implementing Classes:
ArrayImpl

public interface Array extends Shadow<ArrayType>
  • Method Details

    • isSubtypeOf

      boolean isSubtypeOf(Shadow<? extends TypeMirror> shadow)
      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())
    • getComponentType

      Shadow<TypeMirror> getComponentType()
      String[]
    • getDirectSuperTypes

      List<Shadow<TypeMirror>> getDirectSuperTypes()
      returns Object[] for declared arrays and an Intersection of java.io.Serializable&java.lang.Cloneable for primitives
    • erasure

      Array erasure()
      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[]

    • asExtendsWildcard

      Wildcard asExtendsWildcard()
    • asSuperWildcard

      Wildcard asSuperWildcard()
    • asArray

      Array asArray()
      String[] -> String[][]
    • equals

      boolean equals(Object obj)
      be careful using this equals
      Specified by:
      equals in interface Shadow<ArrayType>
      Overrides:
      equals in class Object
      See Also: