Class Type

  • Direct Known Subclasses:
    UserType

    public class Type
    extends Object
    This class represents a Type.
    • Field Detail

      • descriptor

        public String descriptor
        Descriptor of the type.
      • signature

        public String signature
        Signature of the type.
      • typeName

        public String typeName
        Type name.
      • includes

        public List<Type> includes
        List of sub-types of the type (like arrays, collections...).
    • Constructor Detail

      • Type

        public Type()
        Creates an empty Type
      • Type

        public Type​(String newdescriptor,
                    String newsignature,
                    String newtypeName)
        Type constructor with provided descriptor and signature
        Parameters:
        newdescriptor - Descriptor of the type
        newsignature - Signature of the type
        newtypeName - Type name
      • Type

        public Type​(String newdescriptor,
                    String newsignature,
                    String newtypeName,
                    List<Type> newincludes)
        Type constructor with provided signature
        Parameters:
        newdescriptor - Descriptor of the type
        newsignature - Signature of the type
        newtypeName - Type name
        newincludes - Subtypes
    • Method Detail

      • getJavaTypeInfo

        public final JavaTypeInfo getJavaTypeInfo()
        Get Java language-dependant information of the Type
        Returns:
        Java language-dependant information of the Type
      • getPythonTypeInfo

        public final PythonTypeInfo getPythonTypeInfo()
        Get Python language-dependant information of the Type
        Returns:
        Python language-dependant information of the Type
      • getSignature

        public final String getSignature()
        Get the Type::signature
        Returns:
        the signature
      • getSignatureOrDescriptor

        public final String getSignatureOrDescriptor()
        Get the Type::signature or descriptor if null
        Returns:
        the signature or descriptor if null
      • setSignature

        public final void setSignature​(String newsignature)
        Set the Type::signature
        Parameters:
        newsignature - the signature to set
      • addLanguageDepInfo

        public final void addLanguageDepInfo​(LanguageDependantTypeInfo langInfo)
        Add language dependant information
        Parameters:
        langInfo - Language information
      • getIncludes

        public final List<Type> getIncludes()
        Get includes
        Returns:
        the includes
      • setIncludes

        public final void setIncludes​(List<Type> newincludes)
        Set includes
        Parameters:
        newincludes - the includes to set
      • hashCode

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

        public String getDescriptor()
        Get descriptor
        Returns:
        the descriptor
      • setDescriptor

        public void setDescriptor​(String newdescriptor)
        Set descriptor
        Parameters:
        newdescriptor - the descriptor to set
      • getTypeName

        public String getTypeName()
        Returns:
        the typeName
      • setTypeName

        public void setTypeName​(String typeName)
        Parameters:
        typeName - the typeName to set
      • getId

        public UUID getId()
        Returns:
        the id
      • setId

        public void setId​(UUID id)
        Parameters:
        id - the id to set