net.sf.morph.context.contexts
Class ContextDecorator

java.lang.Object
  extended by net.sf.morph.context.contexts.BaseContext
      extended by net.sf.morph.context.contexts.ContextDecorator
All Implemented Interfaces:
java.util.Map, Context, DecoratedContext

public class ContextDecorator
extends BaseContext
implements Context, DecoratedContext

Decorates any context so that it implements DecoratedLanguage.

Since:
Dec 5, 2004
Author:
Matt Sgarlata

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
ContextDecorator()
           
ContextDecorator(Context context)
           
 
Method Summary
protected  void checkInitialization()
           
 Context getContext()
           
 Converter getConverter()
          Get the converter.
 java.lang.Object getImpl(java.lang.String propertyName)
          Implement get(propertyName).
 java.lang.String[] getPropertyNamesImpl()
          Implement getPropertyNames()
 void setContext(Context context)
           
 void setConverter(Converter converter)
          Set the converter.
 void setImpl(java.lang.String propertyName, java.lang.Object propertyValue)
          Implement set(propertyName, propertyValue).
 
Methods inherited from class net.sf.morph.context.contexts.BaseContext
clear, containsKey, containsValue, entrySet, get, get, get, get, get, getContextMapBridge, getLanguage, getLog, getPropertyNames, isEmpty, keySet, put, putAll, remove, set, set, setContextMapBridge, setLanguage, setLog, size, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.morph.context.DecoratedContext
get, get, get, get, set, set
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ContextDecorator

public ContextDecorator()

ContextDecorator

public ContextDecorator(Context context)
Method Detail

checkInitialization

protected void checkInitialization()

getPropertyNamesImpl

public java.lang.String[] getPropertyNamesImpl()
                                        throws ContextException
Description copied from class: BaseContext
Implement getPropertyNames()

Specified by:
getPropertyNamesImpl in class BaseContext
Returns:
String[] of property names
Throws:
ContextException

getImpl

public java.lang.Object getImpl(java.lang.String propertyName)
                         throws java.lang.Exception
Description copied from class: BaseContext
Implement get(propertyName).

Specified by:
getImpl in class BaseContext
Parameters:
propertyName - to get
Returns:
Object value
Throws:
java.lang.Exception - in case of errors

setImpl

public void setImpl(java.lang.String propertyName,
                    java.lang.Object propertyValue)
             throws ContextException
Description copied from class: BaseContext
Implement set(propertyName, propertyValue).

Specified by:
setImpl in class BaseContext
Parameters:
propertyName - to set
propertyValue - to set
Throws:
ContextException

getContext

public Context getContext()
Returns:
Returns the context.

setContext

public void setContext(Context context)
Parameters:
context - The context to set.

getConverter

public Converter getConverter()
Description copied from class: BaseContext
Get the converter.

Overrides:
getConverter in class BaseContext
Returns:
Returns the converter.

setConverter

public void setConverter(Converter converter)
Description copied from class: BaseContext
Set the converter.

Overrides:
setConverter in class BaseContext
Parameters:
converter - The converter to set.


Copyright © 2004-2008.