Class GosuClassTypeLoader

    • Method Detail

      • getType

        public ICompilableType getType​(String strFullyQualifiedName)
        Description copied from interface: ITypeLoader
        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.

        If the type can be successfully resolved by the typeloader, it will be returned, otherwise it will return null. The sole exception to this rule is the top-level TypeLoaderAccess, which will throw a ClassNotFoundException if none of its composite typeloaders can load the type.

        There is a global lock in TypeLoaderAccess that is acquired when this method is called. Basically one type at a time can be loaded from the system. This method is free to release that lock during this call. This is needed to deal with reentrant type loaders. It is the responsibility of this method to make sure the lock is reacquired before this method returns.

        Type loader access will guarentee that no duplicate types are put into the type loader.

        Parameters:
        strFullyQualifiedName - the fully qualified name of the type
        Returns:
        the corresponding IType or null
      • getAllNamespaces

        public Set<String> getAllNamespaces()
        Description copied from interface: ITypeLoader
        Don't call this method unless you really know what you're doing.
        Returns:
        the set of package (aka namespace) names in which this loader's types reside.
      • getResource

        public URL getResource​(String name)
        Description copied from interface: ITypeLoader
        Finds the resource with the given name. A resource is some data that can be accessed by class code in a way that may be independent of the location of the code. The exact location of the resource is dependent upon the loader implementation

        The name of a resource is a '/'-separated path name that identifies the resource.

        Specified by:
        getResource in interface ITypeLoader
        Overrides:
        getResource in class TypeLoaderBase
        Parameters:
        name - The resource name
        Returns:
        A URL object for reading the resource, or null if the resource could not be found or the invoker doesn't have adequate privileges to get the resource.
      • computeTypeNames

        public Set<String> computeTypeNames()
      • getHandledPrefixes

        public List<String> getHandledPrefixes()
      • handlesNonPrefixLoads

        public boolean handlesNonPrefixLoads()
      • isValidSourceFileHandle

        protected boolean isValidSourceFileHandle​(ISourceFileHandle sourceFile)
      • getAllExtensions

        protected String[] getAllExtensions()
      • shouldKeepDebugInfo

        public boolean shouldKeepDebugInfo​(IGosuClass gsClass)
      • hasNamespace

        public boolean hasNamespace​(String namespace)