Class IntersectionImpl

java.lang.Object
io.determann.shadow.impl.shadow.ShadowImpl<IntersectionType>
io.determann.shadow.impl.shadow.IntersectionImpl
All Implemented Interfaces:
ApiHolder, MirrorBacked<IntersectionType>, Intersection, Shadow<IntersectionType>

public class IntersectionImpl extends ShadowImpl<IntersectionType> implements Intersection
  • Constructor Details

  • Method Details

    • getTypeKind

      public TypeKind getTypeKind()
      Specified by:
      getTypeKind in interface Shadow<IntersectionType>
    • getBounds

      public List<Shadow<TypeMirror>> getBounds()
      Description copied from interface: Intersection
      T extends Collection & Serializable>
      Specified by:
      getBounds in interface Intersection
    • asArray

      public Array asArray()
      Description copied from interface: Intersection
      Collection & Serializable -> Collection & Serializable[]
      Specified by:
      asArray in interface Intersection
    • erasure

      public Shadow<TypeMirror> erasure()
      Description copied from interface: Intersection
      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
       
      Specified by:
      erasure in interface Intersection
    • hashCode

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

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