net.sf.fikin.pojostate
Interface StatePrototype

All Superinterfaces:
java.lang.Cloneable, java.util.Collection, java.lang.Iterable, State
All Known Implementing Classes:
AbstractState, DynamicState, EmptyState, SnapshotState

public interface StatePrototype
extends State, java.lang.Cloneable

A State with ability to clone and factory method for new Properties.

It is used by Decorator during decoration of POJOs. created on Jun 22, 2005

Since:
Version:
$Revision: 1.2 $
Author:
fiykov

Field Summary
 
Fields inherited from interface net.sf.fikin.pojostate.State
SORT_ASC, SORT_BY_DESC, SORT_BY_NAME, SORT_BY_VALUE, SORT_DESC
 
Method Summary
 java.lang.Object clone()
          implements cloning
 Property newProperty(MethodMeta mm)
          instantiate new Property for given MethodMeta This is a factory method used by Decorator during instantiation of new State object
 void setClassLoader(java.lang.ClassLoader loader)
           
 void setFormat(StateFormat format)
          assign the formating object
 void setLocale(java.util.Locale locale)
           
 void setObject(java.lang.Object object)
          assign the underlying POJO
 
Methods inherited from interface net.sf.fikin.pojostate.State
getClassLoader, getFormat, getLocale, getObject, getProperty, sort, toString, update
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

setClassLoader

void setClassLoader(java.lang.ClassLoader loader)
Parameters:
loader - The loader to set.

setLocale

void setLocale(java.util.Locale locale)
Parameters:
locale - The locale to set.

setObject

void setObject(java.lang.Object object)
assign the underlying POJO

Parameters:
object -

setFormat

void setFormat(StateFormat format)
assign the formating object

Parameters:
format -

clone

java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
implements cloning

Throws:
java.lang.CloneNotSupportedException

newProperty

Property newProperty(MethodMeta mm)
                     throws DecorationException
instantiate new Property for given MethodMeta

This is a factory method used by Decorator during instantiation of new State object

Parameters:
mm - to be used as underlying MethodMeta for that Property
Throws:
DecorationException - in case of internal error


Copyright © 2005 Nikolay Fiykov. All Rights Reserved.