Enum Class NoTypeInfo

java.lang.Object
java.lang.Enum<NoTypeInfo>
org.htmlunit.corejs.javascript.lc.type.impl.NoTypeInfo
All Implemented Interfaces:
Serializable, Comparable<NoTypeInfo>, Constable, TypeInfo

public enum NoTypeInfo extends Enum<NoTypeInfo> implements TypeInfo
Declaring it as an enum ensures that NoTypeInfo is always singleton.
See Also:
  • Enum Constant Details

    • INSTANCE

      public static final NoTypeInfo INSTANCE
  • Method Details

    • values

      public static NoTypeInfo[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NoTypeInfo valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • asClass

      public Class<?> asClass()
      Description copied from interface: TypeInfo
      Get the Class object represented by this TypeInfo. For a Type object, the TypeInfo object created from the Type object should return the exact same class as the one after Java erased its generic type info
      Specified by:
      asClass in interface TypeInfo
    • shouldReplace

      public boolean shouldReplace()
      Specified by:
      shouldReplace in interface TypeInfo
      Returns:
      true if this type contains too little information (e.g. being TypeInfo.NONE) and should be replaced by actual object type, false otherwise
    • toString

      public String toString()
      Specified by:
      toString in interface TypeInfo
      Overrides:
      toString in class Enum<NoTypeInfo>
      See Also:
    • toString

      public String toString(TypeFormatContext ctx)
      Specified by:
      toString in interface TypeInfo
    • isAssignableFrom

      public boolean isAssignableFrom(TypeInfo another)
      Object class is assignable from any class
      Specified by:
      isAssignableFrom in interface TypeInfo
      Returns:
      true if the caller TypeInfo represents the super class of the class represented by another TypeInfo
      See Also:
    • isInstance

      public boolean isInstance(Object o)
      Specified by:
      isInstance in interface TypeInfo
      Returns:
      true if o is an instance of this class represented by the caller TypeInfo
      See Also: