public class BDIClassReader extends MicroClassReader
MicroClassReader.DummyClassLoader
Modifier and Type | Field and Description |
---|---|
protected IBDIClassGenerator |
gen
The class generator.
|
protected BDIModelLoader |
loader
The model loader for subcapabilities.
|
Constructor and Description |
---|
BDIClassReader(BDIModelLoader loader)
Create a new bdi class reader.
|
Modifier and Type | Method and Description |
---|---|
protected MTrigger |
buildPlanTrigger(BDIModel bdimodel,
java.lang.String name,
Trigger trigger,
java.lang.ClassLoader cl,
java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs) |
protected java.util.List<MConfigBeliefElement> |
createConfigBeliefsList(NameValue[] values)
Create config beliefs.
|
protected java.util.List<MConfigParameterElement> |
createConfigParamElementsList(NameValue[] values)
Create config parameter elements.
|
protected MicroClassReader.DummyClassLoader |
createDummyClassLoader(java.lang.ClassLoader original,
java.lang.ClassLoader parent,
java.util.List<java.net.URL> urls)
Create a throw away class loader.
|
protected MCondition |
createMethodCondition(MParameterElement mpelem,
java.lang.String condtype,
java.lang.String[] evs,
RawEvent[] rawevs,
java.lang.String[] paramevs,
BDIModel model,
java.lang.reflect.Method m,
java.lang.ClassLoader cl) |
protected MGoal |
createMGoal(BDIModel model,
Goal goal,
java.lang.Class<?> gcl,
java.lang.ClassLoader cl,
java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs) |
protected MPlan |
createMPlan(BDIModel bdimodel,
Plan p,
MethodInfo mi,
java.lang.String name,
ClassInfo ci,
java.lang.ClassLoader cl,
java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs) |
protected void |
fillBDIModelFromAnnotations(BDIModel bdimodel,
java.lang.String model,
java.lang.Class<?> cma,
java.lang.ClassLoader cl,
IResourceIdentifier rid,
IComponentIdentifier root,
java.util.List<IComponentFeatureFactory> features)
Fill the model details using annotation.
|
protected MGoal |
getMGoal(BDIModel model,
Goal goal,
java.lang.Class<?> gcl,
java.lang.ClassLoader cl,
java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs) |
protected java.lang.Class |
getMicroAgentClass(java.lang.String clname,
java.lang.String[] imports,
java.lang.ClassLoader classloader)
Get the mirco agent class.
|
protected MPlan |
getMPlan(BDIModel bdimodel,
Plan p,
MethodInfo mi,
ClassInfo ci,
java.lang.ClassLoader cl,
java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs) |
protected MServiceCall |
getServiceCall(BDIModel bdimodel,
ServiceTrigger st) |
protected void |
initBDIModelAfterClassLoading(BDIModel model,
java.lang.ClassLoader cl)
Do model initialization that can only be done after class reading.
|
protected BDIModel |
read(java.lang.String model,
java.lang.Class<?> cma,
java.lang.ClassLoader cl,
IResourceIdentifier rid,
IComponentIdentifier root,
java.util.List<IComponentFeatureFactory> features)
Load the model.
|
MicroModel |
read(java.lang.String model,
java.lang.String[] imports,
java.lang.ClassLoader classloader,
IResourceIdentifier rid,
IComponentIdentifier root,
java.util.List<IComponentFeatureFactory> features)
Load a model.
|
static java.util.List<EventType> |
readAnnotationEvents(MCapability capa,
java.lang.annotation.Annotation[][] annos,
java.lang.ClassLoader cl)
Read the annotation events from method annotations.
|
void |
setGenerator(IBDIClassGenerator gen)
Set the generator.
|
checkMethodReturnType, createBinding, createComponentInstanceInfo, createComponentInstanceInfo, createImplementation, createNFRProperties, createRequiredServiceInfo, createUnparsedExpressions, evaluateExpression, fillMicroModelFromAnnotations, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getClass, getClassArray, getOrCreateList, getOrCreateMap, getOrCreateSet, getParameterAnnotations, getParameterAnnotations, getProxyAnnotation, isAnnotationPresent, isAnnotationPresent, isAnnotationPresent, isAnnotationPresent, isClassLoaderCompatible
protected IBDIClassGenerator gen
protected BDIModelLoader loader
public BDIClassReader(BDIModelLoader loader)
public void setGenerator(IBDIClassGenerator gen)
gen
- the gen to setpublic MicroModel read(java.lang.String model, java.lang.String[] imports, java.lang.ClassLoader classloader, IResourceIdentifier rid, IComponentIdentifier root, java.util.List<IComponentFeatureFactory> features)
read
in class MicroClassReader
model
- The model (e.g. file name).imports
- (if any).protected MicroClassReader.DummyClassLoader createDummyClassLoader(java.lang.ClassLoader original, java.lang.ClassLoader parent, java.util.List<java.net.URL> urls)
protected BDIModel read(java.lang.String model, java.lang.Class<?> cma, java.lang.ClassLoader cl, IResourceIdentifier rid, IComponentIdentifier root, java.util.List<IComponentFeatureFactory> features)
read
in class MicroClassReader
protected void fillBDIModelFromAnnotations(BDIModel bdimodel, java.lang.String model, java.lang.Class<?> cma, java.lang.ClassLoader cl, IResourceIdentifier rid, IComponentIdentifier root, java.util.List<IComponentFeatureFactory> features)
protected MTrigger buildPlanTrigger(BDIModel bdimodel, java.lang.String name, Trigger trigger, java.lang.ClassLoader cl, java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs)
protected MServiceCall getServiceCall(BDIModel bdimodel, ServiceTrigger st)
protected MPlan getMPlan(BDIModel bdimodel, Plan p, MethodInfo mi, ClassInfo ci, java.lang.ClassLoader cl, java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs)
protected MPlan createMPlan(BDIModel bdimodel, Plan p, MethodInfo mi, java.lang.String name, ClassInfo ci, java.lang.ClassLoader cl, java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs)
protected MGoal getMGoal(BDIModel model, Goal goal, java.lang.Class<?> gcl, java.lang.ClassLoader cl, java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs)
protected MGoal createMGoal(BDIModel model, Goal goal, java.lang.Class<?> gcl, java.lang.ClassLoader cl, java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs)
protected MCondition createMethodCondition(MParameterElement mpelem, java.lang.String condtype, java.lang.String[] evs, RawEvent[] rawevs, java.lang.String[] paramevs, BDIModel model, java.lang.reflect.Method m, java.lang.ClassLoader cl)
public static java.util.List<EventType> readAnnotationEvents(MCapability capa, java.lang.annotation.Annotation[][] annos, java.lang.ClassLoader cl)
protected java.lang.Class getMicroAgentClass(java.lang.String clname, java.lang.String[] imports, java.lang.ClassLoader classloader)
getMicroAgentClass
in class MicroClassReader
protected java.util.List<MConfigBeliefElement> createConfigBeliefsList(NameValue[] values)
protected java.util.List<MConfigParameterElement> createConfigParamElementsList(NameValue[] values)
protected void initBDIModelAfterClassLoading(BDIModel model, java.lang.ClassLoader cl)