Interface IType

All Superinterfaces:
INamedThing

public interface IType extends INamedThing
Author:
snshor

This class is the base of all the type definitions. It should not be treated as substitute for Java Class, even though in many instances it is.

IType provides very generic functionality, but allows to provide such non-java features as using non-java types, using composite types(for example int, Integer, BigInteger) etc.

  • Method Details

    • getDomain

      IDomain<?> getDomain()
      Provides type validation(usually by constraining type)
      Returns:
    • isAssignableFrom

      boolean isAssignableFrom(IType type)
      Parameters:
      type -
      Returns:
      true if a type is specialization of more general this type if (T1.isAssignableFrom(T2) AND T2.isInstance(x)) -> T1.isInstance(x)
    • isInstance

      boolean isInstance(Object obj)
      Parameters:
      obj -
      Returns:
      true if the object belongs to this type

      Please note how it is similar to selector or domain methods