net.sf.morph.lang
Interface DecoratedLanguage

All Superinterfaces:
Language
All Known Implementing Classes:
BaseLanguage, LanguageDecorator, SimpleLanguage

public interface DecoratedLanguage
extends Language

Extends the capabilities of a Language by adding the capabilities of a Converter.

You should not directly implement this interface, because additional methods may be introduced in later versions of Morph. Instead, implement the Language interface and use the LanguageDecorator to expose this interface.

Since:
Nov 27, 2004
Author:
Matt Sgarlata

Method Summary
 java.lang.Object get(java.lang.Object target, java.lang.String expression, java.lang.Class destinationClass)
          Retrieve the information indicated by expression from target as the type indicated by destinationClass.
 java.lang.Object get(java.lang.Object target, java.lang.String expression, java.lang.Class destinationClass, java.util.Locale locale)
          Retrieve the information indicated by expression from target as the type indicated by destinationClass.
 java.lang.Object get(java.lang.Object target, java.lang.String expression, java.util.Locale locale, java.lang.Class destinationClass)
          Deprecated. why would we need both signatures (Object, String, Locale, Class) and (Object, String, Class, Locale)?
 void set(java.lang.Object target, java.lang.String expression, java.lang.Object value)
          Sets the information indicated by expression on target.value will be automatically converted to a type appropriate for the given expression.
 void set(java.lang.Object target, java.lang.String expression, java.lang.Object value, java.util.Locale locale)
          Sets the information indicated by expression on target.value will be automatically converted to a type appropriate for the given expression.
 
Methods inherited from interface net.sf.morph.lang.Language
get, getType, isProperty
 

Method Detail

get

java.lang.Object get(java.lang.Object target,
                     java.lang.String expression,
                     java.lang.Class destinationClass)
                     throws LanguageException,
                            TransformationException
Retrieve the information indicated by expression from target as the type indicated by destinationClass.

Parameters:
target - the object from which information will be retrieved
expression - an expression specifying which information to retrieve
destinationClass - indicates the type that should be returned by this method
Returns:
the information indicated by expression from target
Throws:
TransformationException - if an error occurs while converting the requested information to the type indicated by destinationClass
LanguageException - if target is null or
an error occurrs while evaluating an otherwise valid expression
InvalidExpressionException - if expression is empty or not a valid expression

get

java.lang.Object get(java.lang.Object target,
                     java.lang.String expression,
                     java.lang.Class destinationClass,
                     java.util.Locale locale)
                     throws LanguageException,
                            TransformationException
Retrieve the information indicated by expression from target as the type indicated by destinationClass.

Parameters:
target - the object from which information will be retrieved
expression - an expression specifying which information to retrieve
destinationClass - indicates the type that should be returned by this method
locale - indicates the locale in which the conversion to type destinationClass should be performed, if applicable
Returns:
the information indicated by expression from target
Throws:
TransformationException - if an error occurs while converting the requested information to the type indicated by destinationClass
LanguageException - if target is null or
an error occurrs while evaluating an otherwise valid expression
InvalidExpressionException - if expression is empty or not a valid expression

get

java.lang.Object get(java.lang.Object target,
                     java.lang.String expression,
                     java.util.Locale locale,
                     java.lang.Class destinationClass)
                     throws LanguageException,
                            TransformationException
Deprecated. why would we need both signatures (Object, String, Locale, Class) and (Object, String, Class, Locale)?

Retrieve the information indicated by expression from target as the type indicated by destinationClass.

Parameters:
target - the object from which information will be retrieved
expression - an expression specifying which information to retrieve
locale - indicates the locale in which the conversion to type destinationClass should be performed, if applicable
destinationClass - indicates the type that should be returned by this method
Returns:
the information indicated by expression from target
Throws:
TransformationException - if an error occurs while converting the requested information to the type indicated by destinationClass
LanguageException - if target is null or
an error occurrs while evaluating an otherwise valid expression
InvalidExpressionException - if expression is empty or not a valid expression

set

void set(java.lang.Object target,
         java.lang.String expression,
         java.lang.Object value)
         throws LanguageException,
                TransformationException
Sets the information indicated by expression on target.value will be automatically converted to a type appropriate for the given expression.

Specified by:
set in interface Language
Parameters:
target - the object that will be modified
expression - an expression specifying which information will be modified
value - the information to be changed
Throws:
TransformationException - if an error occurs while converting value to the appropriate type
LanguageException - if target is null or
an error occurrs while evaluating an otherwise valid expression
InvalidExpressionException - if expression is empty or not a valid expression

set

void set(java.lang.Object target,
         java.lang.String expression,
         java.lang.Object value,
         java.util.Locale locale)
         throws LanguageException,
                TransformationException
Sets the information indicated by expression on target.value will be automatically converted to a type appropriate for the given expression.

Parameters:
target - the object that will be modified
expression - an expression specifying which information will be modified
value - the information to be changed
locale - indicates the locale in which the conversion to type destinationClass should be performed, if applicable
Throws:
TransformationException - if an error occurs while converting value to the appropriate type
LanguageException - if target is null or
an error occurrs while evaluating an otherwise valid expression
InvalidExpressionException - if expression is empty or not a valid expression


Copyright © 2004-2008.