|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvnet.hk2.component.classmodel.InhabitantsParsingContextGenerator
public abstract class InhabitantsParsingContextGenerator
Responsible for generating the collection of inhabitants, decoupling from implementation detail for the caller.
The caller is expected to continually build up the InhabitantsGenerator context by calling add*(), followed by calling getModelInhabitants() to obtain the progenitors of the inhabitants. There are two ways to close this instance, either throughgetContext()
or through calling close() directly.
| Constructor Summary | |
|---|---|
protected |
InhabitantsParsingContextGenerator(ExecutorService es,
ClassPath inhabitantsClassPath,
FileFilter inhabitantsClassPathFilter)
|
| Method Summary | |
|---|---|
protected void |
addInhabitantsScanner(String name,
InhabitantsScanner is)
|
void |
close()
|
static InhabitantsParsingContextGenerator |
create(Habitat h,
ExecutorService es,
ClassPath inhabitantsClassPath,
FileFilter inhabitantsClassPathFilter)
Factory for the InhabitantsParsingContextGenerator |
ParsingContext |
getContext()
Retrieves the parsing context that can be used for model generation elsewhere. |
Collection<InhabitantsScanner> |
getInhabitantsScanners()
|
void |
parse(Collection<File> files)
Add the collection of files to the current InhabitantsGenerator context. |
void |
parse(File f)
Eventually we can perform optimizations here instead of a pass-thru to parseAlways. |
protected void |
parseAlways(Parser parser,
File f)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected InhabitantsParsingContextGenerator(ExecutorService es,
ClassPath inhabitantsClassPath,
FileFilter inhabitantsClassPathFilter)
| Method Detail |
|---|
public static InhabitantsParsingContextGenerator create(Habitat h,
ExecutorService es,
ClassPath inhabitantsClassPath,
FileFilter inhabitantsClassPathFilter)
InhabitantsParsingContextGenerator
h - habitat not currently used; reserved for future usees - the executor to use for any async processing (e.g., parsing)inhabitantsClassPath - the fully qualified classpath in order to resolve the class-modelinhabitantsClassPathFilter - the filter used for pruning the classpath (may also be a ClassPathAdvisor)
public void parse(Collection<File> files)
throws IOException
files - the files to parse.
IOExceptionpublic ParsingContext getContext()
public Collection<InhabitantsScanner> getInhabitantsScanners()
InhabitantsScanners being maintained
protected void addInhabitantsScanner(String name,
InhabitantsScanner is)
public void parse(File f)
throws IOException
IOException
protected void parseAlways(Parser parser,
File f)
throws IOException
IOExceptionpublic void close()
close in interface Closeable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||