|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A interface defining operations expected of a OCL representation
factory class. Such a factory can transform any piece of application data
(Java basic values and objects) into the corresponding representation for
the OCL class library. This interface has to be implemented directly or,
more usually, through DefaultOclFactory
, to adapt the class
library to "different" application code. Application code can be "different"
for example in the way it implements non-unary associations.
Such an adaption may be necessary if the class library is used with an
other code generator, but
usually the implementation given in DefaultOclFactory
should be sufficient.
DefaultOclFactory
Method Summary | |
OclBoolean |
getOclRepresentationFor(boolean b)
In contrast to all other methods, this one is restricted to return OclBoolean objects. |
OclRoot |
getOclRepresentationFor(byte b)
|
OclRoot |
getOclRepresentationFor(char c)
|
OclRoot |
getOclRepresentationFor(double d)
|
OclRoot |
getOclRepresentationFor(float f)
|
OclRoot |
getOclRepresentationFor(int i)
|
OclRoot |
getOclRepresentationFor(long l)
|
OclRoot |
getOclRepresentationFor(Object o)
A sensible implementing class will implement this operation using the instanceof operator to return the correct
OCL representation for the object depending on its type. |
OclRoot |
getOclRepresentationFor(short s)
|
OclRoot |
getOclRepresentationForNull(Class c)
|
OclSequence |
getOclSequenceFor(Object o)
|
OclState |
getOclStateFor(String s)
|
Object |
reconvert(Class targetType,
OclRoot oclObject)
re-transform oclObject into an object of an application type; an implementing class should adapt this method to the transformation implemented in other methods of this class |
Method Detail |
public OclRoot getOclRepresentationFor(Object o)
instanceof
operator to return the correct
OCL representation for the object depending on its type.
Collections, Strings, and application objects will propably result in
OclCollection, OclString and OclAny respectively. It might be necessary
to take special care of arrays of different type.
OclAny
,
OclCollection
,
OclString
public OclRoot getOclRepresentationForNull(Class c)
public OclBoolean getOclRepresentationFor(boolean b)
OclBoolean
objects.
public OclRoot getOclRepresentationFor(byte b)
public OclRoot getOclRepresentationFor(short s)
public OclRoot getOclRepresentationFor(int i)
public OclRoot getOclRepresentationFor(long l)
public OclRoot getOclRepresentationFor(float f)
public OclRoot getOclRepresentationFor(double d)
public OclRoot getOclRepresentationFor(char c)
public OclState getOclStateFor(String s)
DefaultOclFactory.getOclStateFor(String s)
public Object reconvert(Class targetType, OclRoot oclObject)
public OclSequence getOclSequenceFor(Object o)
|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |