Class SourceHabitats.SourceHabitat

java.lang.Object
eu.bandm.tools.util.files.SourceHabitats.SourceHabitat
Direct Known Subclasses:
SourceHabitats.SourceHabitat_file, SourceHabitats.SourceHabitat_resource
Enclosing class:
SourceHabitats

public abstract class SourceHabitats.SourceHabitat extends Object
Represents one of many potential sources which have to be searched for library modules, etc.

The positions where the sources live is encoded in the name of this instance:

     FILE_/xxxx/xxx/     absolute file position
     FILE_xxxx/xxx/      relative file position
                              with instances xxxx/xxx/a.txt, etc.
     RES_a.b.c/d/e       resource relative to class a.b.c., with 
                              relative file position d/e and
                              instances a.b.c/d/e/f.txt, etc.
   
These prefices are defined by SourceHabitats.PREFIX_RESOURCE and SourceHabitats.PREFIX_FILE. Other kinds of source habitats can be defined, with their own searching rules, by subclassing from this class.
  • Field Details

    • name

      protected String name
      Must be encoded with the prefix rules, as described in the class documentation text.
    • ok

      protected boolean ok
      Set once on initialization to indicate that this Habitat is usable for searching and can be added to the search list.
  • Constructor Details

  • Method Details