Interface Intersection

All Superinterfaces:
ApiHolder, MirrorBacked<IntersectionType>, Shadow<IntersectionType>
All Known Implementing Classes:
IntersectionImpl

public interface Intersection extends Shadow<IntersectionType>
T extends Collection & Serializable>
  • Method Details

    • asArray

      Array asArray()
      Collection & Serializable -> Collection & Serializable[]
    • erasure

      Shadow<TypeMirror> 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())
      
       The erasure of an IntersectionType is its first bound type
       public class IntersectionExample<T extends Collection & Serializable>{} -> Collection
       public class IntersectionExample<T extends Serializable & Collection>{} -> Serializable
       
    • equals

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

      List<Shadow<TypeMirror>> getBounds()
      T extends Collection & Serializable>