Class ResolvableType

    • Method Detail

      • isResolved

        public boolean isResolved()
        Specified by:
        isResolved in interface Type
        Returns:
        true if the type is fully resolved
      • getId

        public long getId()
        Specified by:
        getId in interface Type
        Returns:
        unique type ID
      • hasConstantPool

        public boolean hasConstantPool()
        Specified by:
        hasConstantPool in interface Type
        Returns:
        is the type using constant pool
      • asValue

        public TypedValueImpl asValue​(String value)
        Description copied from interface: Type
        Shortcut for wrapping the given value instance as a TypedValue object
        Specified by:
        asValue in interface Type
        Specified by:
        asValue in interface TypeImpl
        Parameters:
        value - the value to wrap
        Returns:
        a TypedValue object representing the typed value
      • asValue

        public TypedValueImpl asValue​(byte value)
        Description copied from interface: Type
        Shortcut for wrapping the given value instance as a TypedValue object
        Specified by:
        asValue in interface Type
        Specified by:
        asValue in interface TypeImpl
        Parameters:
        value - the value to wrap
        Returns:
        a TypedValue object representing the typed value
      • asValue

        public TypedValueImpl asValue​(char value)
        Description copied from interface: Type
        Shortcut for wrapping the given value instance as a TypedValue object
        Specified by:
        asValue in interface Type
        Specified by:
        asValue in interface TypeImpl
        Parameters:
        value - the value to wrap
        Returns:
        a TypedValue object representing the typed value
      • asValue

        public TypedValueImpl asValue​(short value)
        Description copied from interface: Type
        Shortcut for wrapping the given value instance as a TypedValue object
        Specified by:
        asValue in interface Type
        Specified by:
        asValue in interface TypeImpl
        Parameters:
        value - the value to wrap
        Returns:
        a TypedValue object representing the typed value
      • asValue

        public TypedValueImpl asValue​(int value)
        Description copied from interface: Type
        Shortcut for wrapping the given value instance as a TypedValue object
        Specified by:
        asValue in interface Type
        Specified by:
        asValue in interface TypeImpl
        Parameters:
        value - the value to wrap
        Returns:
        a TypedValue object representing the typed value
      • asValue

        public TypedValueImpl asValue​(long value)
        Description copied from interface: Type
        Shortcut for wrapping the given value instance as a TypedValue object
        Specified by:
        asValue in interface Type
        Specified by:
        asValue in interface TypeImpl
        Parameters:
        value - the value to wrap
        Returns:
        a TypedValue object representing the typed value
      • asValue

        public TypedValueImpl asValue​(float value)
        Description copied from interface: Type
        Shortcut for wrapping the given value instance as a TypedValue object
        Specified by:
        asValue in interface Type
        Specified by:
        asValue in interface TypeImpl
        Parameters:
        value - the value to wrap
        Returns:
        a TypedValue object representing the typed value
      • asValue

        public TypedValueImpl asValue​(double value)
        Description copied from interface: Type
        Shortcut for wrapping the given value instance as a TypedValue object
        Specified by:
        asValue in interface Type
        Specified by:
        asValue in interface TypeImpl
        Parameters:
        value - the value to wrap
        Returns:
        a TypedValue object representing the typed value
      • asValue

        public TypedValueImpl asValue​(boolean value)
        Description copied from interface: Type
        Shortcut for wrapping the given value instance as a TypedValue object
        Specified by:
        asValue in interface Type
        Specified by:
        asValue in interface TypeImpl
        Parameters:
        value - the value to wrap
        Returns:
        a TypedValue object representing the typed value
      • isBuiltin

        public boolean isBuiltin()
        Specified by:
        isBuiltin in interface Type
        Returns:
        is the type built-in or a custom type
      • isSimple

        public boolean isSimple()
        Description copied from interface: Type
        A simple type has only one field which is of a built-in type
        Specified by:
        isSimple in interface Type
        Returns:
        true if the type is 'simple'
      • getSupertype

        public String getSupertype()
        Specified by:
        getSupertype in interface Type
        Returns:
        the super type - may be null
      • canAccept

        public boolean canAccept​(Object value)
        Description copied from interface: Type
        Checks whether the type can accept the given value
        Specified by:
        canAccept in interface Type
        Parameters:
        value - the value to check
        Returns:
        true only if the type can safely hold the value
      • isSame

        public boolean isSame​(NamedType other)
        Specified by:
        isSame in interface NamedType
        Parameters:
        other - other type
        Returns:
        true if the two types are the same (have the same name)
      • isUsedBy

        public boolean isUsedBy​(Type other)
        Description copied from interface: Type
        Checks whether this particular type is used as a field type in the other type.
        Specified by:
        isUsedBy in interface Type
        Parameters:
        other - the other type
        Returns:
        true if any of the fields in 'other' type are of this particular type
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object