|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.hk2.component.InhabitantsParser
public class InhabitantsParser
Parses /META-INF/inhabitants and populate Habitat
.
This class can be subclasses to customize the parsing behavior, which is useful for ignoring some components.
Field Summary | |
---|---|
Habitat |
habitat
|
Constructor Summary | |
---|---|
InhabitantsParser(Habitat habitat)
|
Method Summary | |
---|---|
protected void |
add(Inhabitant i,
KeyValuePairParser kvpp)
Adds the given inhabitant to the habitat, with all its indices. |
static MultiMap<java.lang.String,java.lang.String> |
buildMetadata(KeyValuePairParser kvpp)
|
void |
drop(java.lang.Class component)
Tells InhabitantsParser that if it encounters the specified component
while parsing inhabitants file,
simply drop it and pretend that such an inhabitant had never existed. |
void |
drop(java.lang.String fullyQualifiedClassName)
|
void |
parse(InhabitantsScanner scanner,
Holder<java.lang.ClassLoader> classLoader)
Parses the inhabitants file (which is represented by InhabitantsScanner . |
void |
replace(java.lang.Class oldComponent,
java.lang.Class newComponent)
Tells InhabitantsParser that if it encounters the specified component
while parsing inhabitants file,
ignore the one in the inhabitants file and instead insert the specified 'new' component. |
void |
replace(java.lang.String oldComponentFullyQualifiedClassName,
java.lang.Class newComponent)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Habitat habitat
Constructor Detail |
---|
public InhabitantsParser(Habitat habitat)
Method Detail |
---|
public void drop(java.lang.Class component)
InhabitantsParser
that if it encounters the specified component
while parsing inhabitants file,
simply drop it and pretend that such an inhabitant had never existed.
This is useful when the application that's hosting an HK2 environment wants to tweak the inhabitant population at sub-module level.
public void drop(java.lang.String fullyQualifiedClassName)
public void replace(java.lang.Class oldComponent, java.lang.Class newComponent)
InhabitantsParser
that if it encounters the specified component
while parsing inhabitants file,
ignore the one in the inhabitants file and instead insert the specified 'new' component.
This is useful when the application that's hosting an HK2 environment wants to tweak the inhabitant population at sub-module level.
public void replace(java.lang.String oldComponentFullyQualifiedClassName, java.lang.Class newComponent)
public void parse(InhabitantsScanner scanner, Holder<java.lang.ClassLoader> classLoader) throws java.io.IOException
InhabitantsScanner
.
All the earlier drop/replace commands will be honored during this process.
java.io.IOException
protected void add(Inhabitant i, KeyValuePairParser kvpp)
public static MultiMap<java.lang.String,java.lang.String> buildMetadata(KeyValuePairParser kvpp)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |