Class PropertiesTypeLoader

    • Field Detail

      • _namespaces

        protected Set<String> _namespaces
    • Constructor Detail

      • PropertiesTypeLoader

        public PropertiesTypeLoader​(IModule module)
    • Method Detail

      • computeTypeNames

        public Set<String> computeTypeNames()
      • getHandledPrefixes

        public List<String> getHandledPrefixes()
      • handlesNonPrefixLoads

        public boolean handlesNonPrefixLoads()
      • isDisplayPropertiesFile

        public static boolean isDisplayPropertiesFile​(String fileName)
      • getType

        public IType getType​(String fullyQualifiedName)
        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:
        fullyQualifiedName - the fully qualified name of the type
        Returns:
        the corresponding IType or null
      • getTypesForFile

        public String[] getTypesForFile​(IFile file)
        Description copied from interface: ITypeLoader
        Returns ALL type names associated with the given file whether or not the types have been loaded yet. Type loading should NOT be used in the implementation of this method.
        Specified by:
        getTypesForFile in interface ITypeLoader
        Overrides:
        getTypesForFile in class TypeLoaderBase
        Parameters:
        file - The file in question
        Returns:
        All known types derived from that file
      • refreshedFile

        public RefreshKind refreshedFile​(IFile file,
                                         String[] types,
                                         RefreshKind kind)
        Description copied from interface: ITypeLoader
        Notifies the type loader that a file has been refreshed. The type loader should return all types that it knows need to be refreshed based on the given file.
        Specified by:
        refreshedFile in interface ITypeLoader
        Overrides:
        refreshedFile in class TypeLoaderBase
        Parameters:
        file - The file that was refreshed
        Returns:
        All known types affected by the file change
      • hasNamespace

        public boolean hasNamespace​(String namespace)
      • 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.
      • getInterface

        public <T> T getInterface​(Class<T> apiInterface)
        Description copied from interface: IPluginHost
        Provides an implementation of a specified interface.
        Returns:
        The implementation of the interface or null if unsupported.