org.glassfish.hk2.inhabitants
Class InhabitantFileBasedParser
java.lang.Object
org.glassfish.hk2.inhabitants.InhabitantFileBasedParser
- All Implemented Interfaces:
- InhabitantParser
public class InhabitantFileBasedParser
- extends Object
- implements InhabitantParser
InhabitantParser
implementation based on the inhabitant
file format.
Format of the inhabitant is subject to changes and compatibility across releases cannot
be guaranteed.
file : line+
line : class=class-value, (key=value ,?)+
key : index | targetType | any
class-value : Class.getName()
name of the service implementation
index : index-name[:name](,index)*
index-name : Class.getName()
class name of the contract
name: string identifying the service name
targeType : class-type (, method-name)?
class-type : class name where InhabitantAnnotation
was declared
method-name : method name if the InhabitantAnnotation
was placed on a method
any : some-key=some-value
some-key : [a-z]+
some-value : [a-z]+
"Any" above contributes to the metadata portion of the inhabitant.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InhabitantFileBasedParser
public InhabitantFileBasedParser(KeyValuePairParser parser)
getIndexes
public Iterable<String> getIndexes()
- Specified by:
getIndexes
in interface InhabitantParser
getImplName
public String getImplName()
- Specified by:
getImplName
in interface InhabitantParser
getLine
public String getLine()
- Specified by:
getLine
in interface InhabitantParser
setImplName
public void setImplName(String name)
- Specified by:
setImplName
in interface InhabitantParser
rewind
public void rewind()
- Specified by:
rewind
in interface InhabitantParser
getMetaData
public MultiMap<String,String> getMetaData()
- Specified by:
getMetaData
in interface InhabitantParser
buildMetadata
public static MultiMap<String,String> buildMetadata(KeyValuePairParser kvpp)
Copyright © 2013 Oracle Corporation. All Rights Reserved.