Interface ITypeSystem

    • Method Detail

      • get

        IType get​(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​(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​(String relativeName,
                                ITypeUsesMap typeUses)
                         throws 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:
        ClassNotFoundException - if the specified name doesn't correspond to any type
      • getByFullName

        IType getByFullName​(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:
        RuntimeException - if the specified name doesn't correspond to any type
      • getByFullNameIfValid

        IType getByFullNameIfValid​(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​(String fullyQualifiedName)
      • refresh

        void refresh​(ITypeRef typeRef)
      • refresh

        void refresh​(boolean bRefreshCaches)
      • refresh

        void refresh​(IModule module)
      • shutdown

        void shutdown()
      • getRefreshChecksum

        int getRefreshChecksum()
      • getSingleRefreshChecksum

        int getSingleRefreshChecksum()
      • getComponentType

        IType getComponentType​(IType valueType)
      • getAllTypeNames

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

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

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

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

        void addTypeLoaderListenerAsWeakRef​(ITypeLoaderListener listener)
      • pushTypeLoader

        void pushTypeLoader​(ITypeLoader loader)
      • removeTypeLoader

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

        void pushIncludeAll()
      • popIncludeAll

        void popIncludeAll()
      • isIncludeAll

        boolean isIncludeAll()
      • getCurrentCompilingType

        IType getCurrentCompilingType()
      • getCompilingType

        IType getCompilingType​(String strName)
      • pushCompilingType

        void pushCompilingType​(IType type)
      • popCompilingType

        void popCompilingType()
      • pushSymTableCtx

        void pushSymTableCtx​(ISymbolTable ctx)
      • popSymTableCtx

        void popSymTableCtx()
      • getNameOfParams

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

        ISymbolTable getCompiledGosuClassSymbolTable()
      • getJavaType

        IType getJavaType​(Class javaClass)
      • getNameWithQualifiedTypeVariables

        String getNameWithQualifiedTypeVariables​(IType type)
      • getDefaultParameterizedType

        IType getDefaultParameterizedType​(IType type)
      • getDefaultParameterizedTypeWithTypeVars

        IType getDefaultParameterizedTypeWithTypeVars​(IType type)
      • canCast

        boolean canCast​(IType lhsType,
                        IType rhsType)
      • 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​(Object obj)
      • isExpandable

        boolean isExpandable​(IType type)
      • clearErrorTypes

        void clearErrorTypes()
      • dumpGosuClassLoader

        void dumpGosuClassLoader()
      • pushModule

        void pushModule​(IModule gosuModule)
      • popModule

        void popModule​(IModule gosuModule)
      • replaceTypeVariableTypeParametersWithBoundingTypes

        IType replaceTypeVariableTypeParametersWithBoundingTypes​(IType iType,
                                                                 IType type)