Package eu.bandm.tools.util2
Class SourceHabitats.SourceHabitat
java.lang.Object
eu.bandm.tools.util2.SourceHabitats.SourceHabitat
- Direct Known Subclasses:
SourceHabitats.SourceHabitat_file,SourceHabitats.SourceHabitat_resource
- Enclosing class:
- SourceHabitats
Represents one of many potential sources which have
to be searched for library modules, etc.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @Opt SourceHabitats.FoundSourcetest_for_inputStream(String id, boolean verbose, String[] suffices) Deliver an input source or null, if no resource found.protected abstract @Opt SourceHabitats.FoundSourcetest_idExt(String id, boolean verbose, String ext) Finds the resource with the given name.
-
Field Details
-
name
Must be encoded with the prefix rules, as described in the class doc text. -
ok
protected boolean okSet once on initialization to indicate that this Habitat is usable for searching.
-
-
Constructor Details
-
SourceHabitat
-
-
Method Details
-
test_idExt
@Opt protected abstract @Opt SourceHabitats.FoundSource test_idExt(String id, boolean verbose, String ext) Finds the resource with the given name. This must be implemented differently for different kinds of Habitats.- Parameters:
id- name of the resource (mostly the file name "stem")ext- extension of the resource name / file name. The leading dot (=".") must be included.- Returns:
- the found resource or null if no such exists.
-
test_for_inputStream
@Opt protected @Opt SourceHabitats.FoundSource test_for_inputStream(String id, boolean verbose, String[] suffices) Deliver an input source or null, if no resource found. Fills in the found stream and "location" into the aSourceHabitats.FoundSourceobject. This implementation works for all kinds of habitats by callingtest_idExt(java.lang.String,boolean,java.lang.String).
-