|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectaspoev.manager.adapter.InstanceAdapter
This is the strategy class in the AspOEv framework which encapsulates the concern of instance adaptation, or instance conversion. Implementing strategies must appropriately override the 'convert', 'unknownField', and 'unknownMethod' methods to adapt instances in the desired manner.
| Constructor Summary | |
InstanceAdapter()
|
|
| Method Summary | |
protected MetaObject |
convert(MetaObject object,
TypeReferenceElement type)
Attempts to physically convert the objects by creating a new Vejal object of the requested type and copying all matching fields. |
java.lang.Object |
convertPrimitive(java.lang.Object primitive,
TypeReferenceElement type)
Provides default conversion for primitives, double to String, etc. |
protected java.lang.Object |
executeMethod(UnknownMethodInvokationException umie)
|
protected TypeReferenceElement |
getCommonAncestor(java.util.LinkedList oneDerivation,
java.util.LinkedList twoDerivation)
|
java.lang.Object |
getDefaultValue(TypeReferenceElement type)
Provides a default value for the argument type. |
protected java.util.LinkedList |
getDerivationHistory(TypeReferenceElement type)
Gets the derivation of the specified version, all the way to the first version of the type. |
java.util.Collection |
getVersionDerivationPath(TypeReferenceElement one,
TypeReferenceElement two)
Gets the derivation differences of the two types, and the versions between them on the version derivation graph. |
DatabaseObject |
retypeObject(DatabaseObject object,
TypeReferenceElement type)
This method is called by the framework aspects, but it does not actually do the conversion - that is left up to the 'convert' method. |
void |
testVersionDerivation(TypeReferenceElement one,
TypeReferenceElement two)
For testing only. |
void |
unknownField(UnknownFieldReferenceException ufre)
Takes the appropriate action when an UnknownFieldReferenceException is thrown. |
void |
unknownMethod(UnknownMethodInvokationException umie)
Takes the appropriate action when an UnknownMethodInvokationException is thrown. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public InstanceAdapter()
| Method Detail |
public final DatabaseObject retypeObject(DatabaseObject object,
TypeReferenceElement type)
protected MetaObject convert(MetaObject object,
TypeReferenceElement type)
object - The Object to converttype - The type to convet the object to.
public java.lang.Object convertPrimitive(java.lang.Object primitive,
TypeReferenceElement type)
public java.lang.Object getDefaultValue(TypeReferenceElement type)
protected java.util.LinkedList getDerivationHistory(TypeReferenceElement type)
protected TypeReferenceElement getCommonAncestor(java.util.LinkedList oneDerivation,
java.util.LinkedList twoDerivation)
public java.util.Collection getVersionDerivationPath(TypeReferenceElement one,
TypeReferenceElement two)
public void testVersionDerivation(TypeReferenceElement one,
TypeReferenceElement two)
public void unknownField(UnknownFieldReferenceException ufre)
public void unknownMethod(UnknownMethodInvokationException umie)
protected java.lang.Object executeMethod(UnknownMethodInvokationException umie)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||