|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.virtual.plugins.context.DefaultOptions
public class DefaultOptions
Options impl.
| Constructor Summary | |
|---|---|
DefaultOptions()
|
|
| Method Summary | ||
|---|---|---|
void |
addOption(String name,
Object option)
Set an option against the type. |
|
void |
addOptions(Map<String,?> map)
Add options. |
|
boolean |
getBooleanOption(String name)
Get boolean option. |
|
|
getOption(Class<T> expectedType)
Get option. |
|
Object |
getOption(String name)
Get an option from the type |
|
|
getOption(String name,
Class<T> expectedType)
Get the option. |
|
|
getOptions(Class<T> exactType)
Get all options that match type. |
|
void |
merge(Options other)
Merge options. |
|
void |
removeOption(String name)
Remove an option |
|
int |
size()
Get options size. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultOptions()
| Method Detail |
|---|
public int size()
Options
size in interface Optionspublic void merge(Options other)
Options
merge in interface Optionsother - the other optionspublic <T> Map<String,T> getOptions(Class<T> exactType)
Options
getOptions in interface OptionsT - the exact typeexactType - the exact type
public void addOption(String name,
Object option)
OptionsIf you add a future object, subsequent gets will wait for the result
WARNING: Be careful about what you put in here. Don't create references across classloaders, if you are not sure add a WeakReference to the information.
addOption in interface Optionsname - the nameoption - the option, pass null to remove an optionpublic void addOptions(Map<String,?> map)
Options
addOptions in interface Optionsmap - the options mappublic void removeOption(String name)
Options
removeOption in interface Optionsname - the namepublic Object getOption(String name)
Options
getOption in interface Optionsname - the name
public <T> T getOption(Class<T> expectedType)
Options
getOption in interface OptionsT - the expectedTypeexpectedType - the expected type.
public <T> T getOption(String name,
Class<T> expectedType)
Options
getOption in interface OptionsT - the expected typename - the nameexpectedType - the expected type
public boolean getBooleanOption(String name)
Options
getBooleanOption in interface Optionsname - the name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||