Module xl.core

Class IntersectionType

All Implemented Interfaces:
Member, Type<Object>

public class IntersectionType extends TypeImpl<Object>
  • Constructor Details

    • IntersectionType

      public IntersectionType(String pkg)
    • IntersectionType

      public IntersectionType(Type<?> base)
  • Method Details

    • getPackage

      public String getPackage()
      Specified by:
      getPackage in interface Type<Object>
      Overrides:
      getPackage in class TypeImpl<Object>
    • getSupertype

      public Type<Object> getSupertype()
      Specified by:
      getSupertype in interface Type<Object>
      Overrides:
      getSupertype in class TypeImpl<Object>
    • getComponentType

      public Type<?> getComponentType()
      Specified by:
      getComponentType in interface Type<Object>
      Overrides:
      getComponentType in class TypeImpl<Object>
    • isInstance

      public boolean isInstance(Object o)
      Specified by:
      isInstance in interface Type<Object>
      Overrides:
      isInstance in class TypeImpl<Object>
    • getDeclaredInterfaceCount

      public int getDeclaredInterfaceCount()
      Specified by:
      getDeclaredInterfaceCount in interface Type<Object>
      Overrides:
      getDeclaredInterfaceCount in class TypeImpl<Object>
    • getDeclaredInterface

      public Type<?> getDeclaredInterface(int index)
      Specified by:
      getDeclaredInterface in interface Type<Object>
      Overrides:
      getDeclaredInterface in class TypeImpl<Object>
    • narrow

      public void narrow(Type<?> newBase)
    • addInterface

      public void addInterface(Type<?> iface)
    • intersect

      public void intersect(Type<?> t)
    • simplify

      public Type<?> simplify()
    • getImplementationClass

      public Class<Object> getImplementationClass()
      Specified by:
      getImplementationClass in interface Type<Object>
      Overrides:
      getImplementationClass in class TypeImpl<Object>
    • getBinaryType

      public Type<?> getBinaryType()
    • getDescriptor

      public String getDescriptor()
      Description copied from interface: Member
      Returns a descriptor for this member. Descriptors are constructed as follows:
      • For types, descriptors are defined as for the Java Virtual Machine. For primitive types these are the single characters 'Z', 'B', 'S', 'C', 'I', 'J', 'F', 'D', 'V' for boolean, byte, short, char, int, long, float, double, void. For array types, the descriptor is the character '[' plus the descriptor of its component type, e.g., [[I for int[][]. For non-array reference types, the descriptor is the character 'L', followed by the binary name (see Type.getBinaryName()) of the type, where '.' has to be replaced by '/', followed by ';', e.g., Ljava/lang/Object;.
      • For fields, the descriptor is the character 'f', followed by the simple name of the field, followed by the character ';', followed by the descriptor of the field's type. E.g., fout;Ljava/io/PrintStream; for the field System.out.
      • For methods and constructors, the descriptor is the character 'm', followed by the simple name of the method (which is <init> for constructors), followed by the characters ';' and '(', followed by the descriptors of the method's parameter types, followed by ')', followed by the descriptor of the return type. E.g. mprintln;(Ljava/lang/String;)V for the method PrintStream.println(String).
      Specified by:
      getDescriptor in interface Member
      Overrides:
      getDescriptor in class MemberBase
      Returns:
      the member's descriptor
    • getName

      public String getName()
      Description copied from interface: Member
      Returns the name of this member. For types, this is the canonical name of the type, e.g, java.lang.Object, java.util.Map.Entry. Otherwise, it equals Member.getSimpleName().
      Specified by:
      getName in interface Member
      Overrides:
      getName in class MemberBase
      Returns:
      name of the member
    • getSimpleName

      public String getSimpleName()
      Description copied from interface: Member
      Returns the simple name of this member. This is the single identifier with which the member is declared in source code, e.g., Object, out, println.
      Specified by:
      getSimpleName in interface Member
      Overrides:
      getSimpleName in class TypeImpl<Object>
      Returns:
      simple name of the member
    • getBinaryName

      public String getBinaryName()
      Specified by:
      getBinaryName in interface Type<Object>
      Overrides:
      getBinaryName in class TypeImpl<Object>