|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DecoratedContext
Adds the capabilities of a Language and a Converter to a Context to expose additional functionality.
You should not directly implement this interface, because additional methods may be introduced in later versions of Morph. Instead, implement the Context interface and use the ContextDecorator to expose this interface.
Method Summary | |
---|---|
java.lang.Object |
get(java.lang.String expression)
Retrieve the property named propertyName . |
java.lang.Object |
get(java.lang.String expression,
java.lang.Class destinationClass)
Retrieve the information indicated by expression as the
type indicated by destinationClass . |
java.lang.Object |
get(java.lang.String expression,
java.lang.Class destinationClass,
java.util.Locale locale)
Retrieve the information indicated by expression as the
type indicated by destinationClass . |
java.lang.Object |
get(java.lang.String expression,
java.util.Locale locale,
java.lang.Class destinationClass)
Retrieve the information indicated by expression as the
type indicated by destinationClass . |
void |
set(java.lang.String expression,
java.lang.Object value)
Sets the information indicated by expression to
value , which will be automatically converted to a type
appropriate for the given expression . |
void |
set(java.lang.String expression,
java.lang.Object value,
java.util.Locale locale)
Sets the information indicated by expression on
target . |
Methods inherited from interface net.sf.morph.context.Context |
---|
getPropertyNames |
Method Detail |
---|
java.lang.Object get(java.lang.String expression) throws ContextException
propertyName
. The property
named Context#PROPERTY_NAMES_PROPERTY
has special symantics.
Unless a value for this property has already been explicitly specified
for the context, context.get(PROPERTY_NAMES_PROPERTY)
should return the same result as Context.getPropertyNames()
.
get
in interface Context
expression
- an expression in a language that defines the property to be
retrieved
ContextException
- if the expression is invalid or an error occurrs while
attempting to retrieve the requested informationjava.lang.Object get(java.lang.String expression, java.lang.Class destinationClass) throws ContextException
expression
as the
type indicated by destinationClass
.
expression
- an expression specifying which information to retrievedestinationClass
- indicates the type that should be returned by this method
ContextException
- if the expression is invalid or an error occurrs while
attempting to retrieve the requested informationjava.lang.Object get(java.lang.String expression, java.lang.Class destinationClass, java.util.Locale locale) throws ContextException
expression
as the
type indicated by destinationClass
.
expression
- an expression specifying which information to retrievedestinationClass
- indicates the type that should be returned by this methodlocale
- indicates the locale in which the conversion to type
destinationClass
should be performed, if
applicable
ContextException
- if the expression is invalid or an error occurrs while
attempting to retrieve the requested informationjava.lang.Object get(java.lang.String expression, java.util.Locale locale, java.lang.Class destinationClass) throws ContextException
expression
as the
type indicated by destinationClass
.
expression
- an expression specifying which information to retrievelocale
- indicates the locale in which the conversion to type
destinationClass
should be performed, if
applicabledestinationClass
- indicates the type that should be returned by this method
ContextException
- if the expression is invalid or an error occurred while
attempting to retrieve the requested informationvoid set(java.lang.String expression, java.lang.Object value) throws ContextException
expression
to
value
, which will be automatically converted to a type
appropriate for the given expression
.
set
in interface Context
expression
- an expression specifying which information will be modifiedvalue
- the information to be changed
ContextException
- if the given expression is invalid or an error occurred while
attempting to set the given valuevoid set(java.lang.String expression, java.lang.Object value, java.util.Locale locale) throws ContextException
expression
on
target
. value
will be automatically
converted to a type appropriate for the given expression
.
expression
- an expression specifying which information will be modifiedvalue
- the information to be changedlocale
- indicates the locale in which the conversion to type
destinationClass
should be performed, if
applicable
ContextException
- if the given expression is invalid or an error occurred while
attempting to set the given value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |