Interface ITypeSystem

    • Method Detail

      • get

        IType get​(java.lang.Class<?> javaClass)
        Gets the intrinsic type for a given class.

        Note: you should use this method only if you do not have an Object of class javaClass to get the type from. If you do have such an object, use getFromObject(java.lang.Object) instead.

        Parameters:
        javaClass - the Class to convert to an intrinsic type
        Returns:
        the IType that corresponds to that class
        See Also:
        getFromObject(Object)
      • get

        IType get​(IJavaClassInfo javaClassInfo)
        Gets the intrinsic type for a given class info object.

        Parameters:
        javaClassInfo - the Class info object to convert to an intrinsic type
        Returns:
        the IType that corresponds to that class
      • getFromObject

        IType getFromObject​(java.lang.Object object)
        Returns the intrinsic type for the given Object.
        Parameters:
        object - the object to get an IType for
        Returns:
        the IType for the object
        See Also:
        get(Class)
      • getByRelativeName

        IType getByRelativeName​(java.lang.String relativeName)
                         throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException
      • getByRelativeName

        IType getByRelativeName​(java.lang.String relativeName,
                                ITypeUsesMap typeUses)
                         throws java.lang.ClassNotFoundException
        Gets an intrinsic type based on a relative name. This could either be the name of an entity, like "User", the name of a typekey, like "SystemPermission", or a class name, like "java.lang.String" (relative and fully qualified class names are the same as far as this factory is concerned). Names can have [] appended to them to create arrays, and multi-dimensional arrays are supported.
        Parameters:
        relativeName - the relative name of the type
        typeUses - the map of used types to use when resolving
        Returns:
        the corresponding IType
        Throws:
        java.lang.ClassNotFoundException - if the specified name doesn't correspond to any type
      • getByFullName

        IType getByFullName​(java.lang.String fullyQualifiedName)
        Gets an intrinsic type based on a fully-qualified name. This could either be the name of an entity, like "entity.User", the name of a typekey, like "typekey.SystemPermission", or a class name, like "java.lang.String". Names can have [] appended to them to create arrays, and multi-dimensional arrays are supported.
        Parameters:
        fullyQualifiedName - the fully qualified name of the type
        Returns:
        the corresponding IType
        Throws:
        java.lang.RuntimeException - if the specified name doesn't correspond to any type
      • getByFullNameIfValid

        IType getByFullNameIfValid​(java.lang.String fullyQualifiedName)
        Gets a type based on a fully-qualified name. This could either be the name of an entity, like "entity.User", the name of a typekey, like "typekey.SystemPermission", or a class name, like "java.lang.String". Names can have [] appended to them to create arrays, and multi-dimensional arrays are supported. This method behaves the same as getByFullName execept instead of throwing it returns null.
        Parameters:
        fullyQualifiedName - the fully qualified name of the type
        Returns:
        the corresponding IType or null if the type does not exist
      • getByFullNameIfValidNoJava

        IType getByFullNameIfValidNoJava​(java.lang.String fullyQualifiedName)
      • refresh

        void refresh​(ITypeRef typeRef)
      • refresh

        void refresh​(boolean bRefreshCaches)
      • refresh

        void refresh​(IModule module)
      • refreshed

        void refreshed​(IResource file,
                       java.lang.String typeName,
                       RefreshKind refreshKind)
      • shutdown

        void shutdown()
      • getTypesForFile

        java.lang.String[] getTypesForFile​(IModule module,
                                           IFile file)
      • getRefreshChecksum

        int getRefreshChecksum()
      • getSingleRefreshChecksum

        int getSingleRefreshChecksum()
      • parseType

        IType parseType​(java.lang.String typeString)
                 throws java.lang.IllegalArgumentException
        Converts a String name of a type into an IType.
        Throws:
        java.lang.IllegalArgumentException - if the type string doesn't correspond to any known IType
      • parseType

        IType parseType​(java.lang.String typeString,
                        ITypeUsesMap typeUsesMap)
                 throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • getComponentType

        IType getComponentType​(IType valueType)
      • getNamespace

        INamespaceType getNamespace​(java.lang.String strFqNamespace)
      • getAllTypeNames

        java.util.Set<? extends java.lang.CharSequence> getAllTypeNames()
        Returns all type names in the system for all type loaders.
        Returns:
        all type names in the system.
      • getOrCreateTypeVariableType

        ITypeVariableType getOrCreateTypeVariableType​(java.lang.String strName,
                                                      IType boundingType,
                                                      IType enclosingType)
      • getOrCreateFunctionType

        IFunctionType getOrCreateFunctionType​(java.lang.String strFunctionName,
                                              IType retType,
                                              IType[] paramTypes)
      • inferTypeVariableTypesFromGenParamTypeAndConcreteType

        void inferTypeVariableTypesFromGenParamTypeAndConcreteType​(IType genParamType,
                                                                   IType argType,
                                                                   TypeVarToTypeMap map)
      • inferTypeVariableTypesFromGenParamTypeAndConcreteType_Reverse

        void inferTypeVariableTypesFromGenParamTypeAndConcreteType_Reverse​(IType genParamType,
                                                                           IType argType,
                                                                           TypeVarToTypeMap map)
      • getErrorType

        IErrorType getErrorType​(java.lang.String strErrantName)
      • findParameterizedType

        IType findParameterizedType​(IType type,
                                    IType rhsType)
      • addTypeLoaderListenerAsWeakRef

        void addTypeLoaderListenerAsWeakRef​(ITypeLoaderListener listener)
      • getNamespacesFromTypeNames

        java.util.Set<java.lang.String> getNamespacesFromTypeNames​(java.util.Set<? extends java.lang.CharSequence> allTypeNames,
                                                                   java.util.Set<java.lang.String> namespaces)
      • pushTypeLoader

        void pushTypeLoader​(ITypeLoader loader)
      • removeTypeLoader

        void removeTypeLoader​(java.lang.Class<? extends ITypeLoader> loader)
      • pushIncludeAll

        void pushIncludeAll()
      • popIncludeAll

        void popIncludeAll()
      • isIncludeAll

        boolean isIncludeAll()
      • getCurrentCompilingType

        IType getCurrentCompilingType()
      • getCompilingType

        IType getCompilingType​(java.lang.String strName)
      • pushCompilingType

        void pushCompilingType​(IType type)
      • popCompilingType

        void popCompilingType()
      • pushSymTableCtx

        void pushSymTableCtx​(ISymbolTable ctx)
      • popSymTableCtx

        void popSymTableCtx()
      • getTypeLoader

        <T extends ITypeLoader> T getTypeLoader​(java.lang.Class<? extends T> loaderClass,
                                                IModule module)
      • getNameOfParams

        java.lang.String getNameOfParams​(IType[] paramTypes,
                                         boolean bRelative,
                                         boolean bWithEnclosingType)
      • getCompiledGosuClassSymbolTable

        ISymbolTable getCompiledGosuClassSymbolTable()
      • getAllTypeLoaders

        java.util.List<ITypeLoader> getAllTypeLoaders()
      • getJavaType

        IType getJavaType​(java.lang.Class javaClass)
      • getNameWithQualifiedTypeVariables

        java.lang.String getNameWithQualifiedTypeVariables​(IType type)
      • getDefaultParameterizedType

        IType getDefaultParameterizedType​(IType type)
      • getDefaultParameterizedTypeWithTypeVars

        IType getDefaultParameterizedTypeWithTypeVars​(IType type)
      • canCast

        boolean canCast​(IType lhsType,
                        IType rhsType)
      • getPrimitiveType

        IJavaType getPrimitiveType​(java.lang.String name)
      • getPrimitiveType

        IType getPrimitiveType​(IType boxType)
      • getBoxType

        IType getBoxType​(IType primitiveType)
      • getExpandableComponentType

        IType getExpandableComponentType​(IType type)
      • getCurrentModule

        IModule getCurrentModule()
      • getOrCreateTypeReference

        ITypeRef getOrCreateTypeReference​(IType type)
      • getTypeFromObject

        IType getTypeFromObject​(java.lang.Object obj)
      • isExpandable

        boolean isExpandable​(IType type)
      • clearErrorTypes

        void clearErrorTypes()
      • boundTypes

        IType boundTypes​(IType parameterType,
                         java.util.List<IType> inferringTypes)
      • dumpGosuClassLoader

        void dumpGosuClassLoader()
      • pushModule

        void pushModule​(IModule gosuModule)
      • popModule

        void popModule​(IModule gosuModule)
      • replaceTypeVariableTypeParametersWithBoundingTypes

        IType replaceTypeVariableTypeParametersWithBoundingTypes​(IType iType,
                                                                 IType type)
      • makeGosucCompiler

        IGosuc makeGosucCompiler​(java.lang.String gosucProjectFile,
                                 ICustomParser custParser)
      • getCompoundType

        IType getCompoundType​(java.util.Set<IType> types)