Package jade.content.onto
Class BCReflectiveIntrospector
- java.lang.Object
-
- jade.content.onto.ReflectiveIntrospector
-
- jade.content.onto.BCReflectiveIntrospector
-
- All Implemented Interfaces:
Introspector,Serializable,Serializable
public class BCReflectiveIntrospector extends ReflectiveIntrospector
Backward Compatible reflective introspector. This Introspector uses Java Reflection to translate java objects to/from abstract descriptors as theReflectiveIntrospectordoes, but it assumes the accessors methods for aggregate slots to be in the "old JADE style" i.e. For every aggregate slot namedXXX, with elements of typeT, the Java class must have two accessible methods, with the following signature:-
Iterator getAllXXX() -
void addXXX(T t)
NOT available in MIDP- Author:
- Giovanni Caire - TILAB
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BCReflectiveIntrospector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckClass(ObjectSchema schema, Class javaClass, Ontology onto)Check the structure of a java class associated to an ontological element to ensure that translations to/from abstract descriptors and java objects (instances of that class) can be accomplished by this introspector.AbsAggregateexternalizeAggregate(String slotName, Object obj, ObjectSchema schema, Ontology referenceOnto)ObjectgetSlotValue(String slotName, Object obj, ObjectSchema schema)ObjectinternalizeAggregate(String slotName, AbsAggregate abs, ObjectSchema schema, Ontology referenceOnto)protected booleanisAggregateObject(Object obj)voidsetSlotValue(String slotName, Object slotValue, Object obj, ObjectSchema schema)-
Methods inherited from class jade.content.onto.ReflectiveIntrospector
externalizeSpecialType, findMethodCaseInsensitive, internalizeSpecialType, invokeAccessorMethod, invokeSetterMethod, translateName
-
-
-
-
Method Detail
-
isAggregateObject
protected boolean isAggregateObject(Object obj)
- Overrides:
isAggregateObjectin classReflectiveIntrospector
-
getSlotValue
public Object getSlotValue(String slotName, Object obj, ObjectSchema schema) throws OntologyException
- Specified by:
getSlotValuein interfaceIntrospector- Overrides:
getSlotValuein classReflectiveIntrospector- Throws:
OntologyException
-
setSlotValue
public void setSlotValue(String slotName, Object slotValue, Object obj, ObjectSchema schema) throws OntologyException
- Specified by:
setSlotValuein interfaceIntrospector- Overrides:
setSlotValuein classReflectiveIntrospector- Throws:
OntologyException
-
checkClass
public void checkClass(ObjectSchema schema, Class javaClass, Ontology onto) throws OntologyException
Check the structure of a java class associated to an ontological element to ensure that translations to/from abstract descriptors and java objects (instances of that class) can be accomplished by this introspector.- Specified by:
checkClassin interfaceIntrospector- Overrides:
checkClassin classReflectiveIntrospector- Parameters:
schema- The schema of the ontological elementjavaClass- The java class associated to the ontologcal elementonto- The Ontology that uses this Introspector- Throws:
OntologyException- if the java class does not have the correct structure
-
externalizeAggregate
public AbsAggregate externalizeAggregate(String slotName, Object obj, ObjectSchema schema, Ontology referenceOnto) throws OntologyException
- Specified by:
externalizeAggregatein interfaceIntrospector- Overrides:
externalizeAggregatein classReflectiveIntrospector- Throws:
OntologyException
-
internalizeAggregate
public Object internalizeAggregate(String slotName, AbsAggregate abs, ObjectSchema schema, Ontology referenceOnto) throws OntologyException
- Specified by:
internalizeAggregatein interfaceIntrospector- Overrides:
internalizeAggregatein classReflectiveIntrospector- Throws:
OntologyException
-
-