Package jadex.micro
Class MicroModel
- java.lang.Object
-
- jadex.kernelbase.CacheableKernelModel
-
- jadex.micro.MicroModel
-
- All Implemented Interfaces:
ICacheableModel
- Direct Known Subclasses:
BDIModel
public class MicroModel extends jadex.kernelbase.CacheableKernelModel
The micro agent model.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MicroModel.ServiceInjectionInfo
Struct for injection info.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,MethodInfo>
agentmethods
The agent methods for given annotations (if any).protected java.lang.ClassLoader
classloader
The class loader.protected InjectionInfoHolder
ii
The injection info.protected ClassInfo
pojoclass
The micro agent class.
-
Constructor Summary
Constructors Constructor Description MicroModel(IModelInfo modelinfo)
Create a new model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAgentInjection(FieldInfo field)
Add an injection field.void
addArgumentInjection(java.lang.String name, FieldInfo field, java.lang.String convert)
Add an injection field.void
addFeatureInjection(java.lang.String name, FieldInfo field)
Add an injection field.void
addParentInjection(FieldInfo field)
Add an injection field.void
addResultInjection(java.lang.String name, FieldInfo field, java.lang.String convert, java.lang.String convback)
Add an injection field.void
addServiceCall(ServiceCallInfo call)
Add an call field.FieldInfo[]
getAgentInjections()
Get the agent injection fields.MethodInfo
getAgentMethod(java.lang.Class<? extends java.lang.annotation.Annotation> ann)
Get an agent method.java.lang.String[]
getArgumentInjectionNames()
Get the argument injection names.Tuple2<FieldInfo,java.lang.String>[]
getArgumentInjections(java.lang.String name)
Get the argument injection fields.java.lang.ClassLoader
getClassloader()
Get the classloader.FieldInfo[]
getFeatureInjections()
Get the feature injection fields.InjectionInfoHolder
getInjectionInfoHolder()
Get the injection info holder.FieldInfo[]
getParentInjections()
Get the parentinjections fields.ClassInfo
getPojoClass()
Get the pojo class.Tuple3<FieldInfo,java.lang.String,java.lang.String>
getResultInjection(java.lang.String name)
Get the result injection field.java.lang.String[]
getResultInjectionNames()
Get the Result injection names.java.util.List<ServiceCallInfo>
getServiceCalls()
Get the service call fields.java.lang.String[]
getServiceInjectionNames()
Get the service injection names.MicroModel.ServiceInjectionInfo[]
getServiceInjections(java.lang.String name)
Get the service injection fields.void
setAgentMethod(java.lang.Class<? extends java.lang.annotation.Annotation> ann, MethodInfo mi)
Set an agent method.void
setClassloader(java.lang.ClassLoader classloader)
Set the classloader.void
setPojoClass(ClassInfo pojoclass)
Set the pojo class.void
setServiceCalls(java.util.List<ServiceCallInfo> servicecalls)
Set the service calls.
-
-
-
Field Detail
-
pojoclass
protected ClassInfo pojoclass
The micro agent class.
-
classloader
protected java.lang.ClassLoader classloader
The class loader.
-
agentmethods
protected java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,MethodInfo> agentmethods
The agent methods for given annotations (if any).
-
ii
protected InjectionInfoHolder ii
The injection info.
-
-
Constructor Detail
-
MicroModel
public MicroModel(IModelInfo modelinfo)
Create a new model.
-
-
Method Detail
-
getInjectionInfoHolder
public InjectionInfoHolder getInjectionInfoHolder()
Get the injection info holder.- Returns:
- The injection info.
-
addAgentInjection
public void addAgentInjection(FieldInfo field)
Add an injection field.- Parameters:
field
- The field.
-
getAgentInjections
public FieldInfo[] getAgentInjections()
Get the agent injection fields.- Returns:
- The fields.
-
addParentInjection
public void addParentInjection(FieldInfo field)
Add an injection field.- Parameters:
field
- The field.
-
getParentInjections
public FieldInfo[] getParentInjections()
Get the parentinjections fields.- Returns:
- The fields.
-
addArgumentInjection
public void addArgumentInjection(java.lang.String name, FieldInfo field, java.lang.String convert)
Add an injection field.- Parameters:
name
- The name.field
- The field.
-
getArgumentInjections
public Tuple2<FieldInfo,java.lang.String>[] getArgumentInjections(java.lang.String name)
Get the argument injection fields.- Returns:
- The fields.
-
getArgumentInjectionNames
public java.lang.String[] getArgumentInjectionNames()
Get the argument injection names.- Returns:
- The names.
-
addResultInjection
public void addResultInjection(java.lang.String name, FieldInfo field, java.lang.String convert, java.lang.String convback)
Add an injection field.- Parameters:
name
- The name.field
- The field.
-
getResultInjection
public Tuple3<FieldInfo,java.lang.String,java.lang.String> getResultInjection(java.lang.String name)
Get the result injection field.- Returns:
- The fields.
-
getResultInjectionNames
public java.lang.String[] getResultInjectionNames()
Get the Result injection names.- Returns:
- The names.
-
getServiceInjections
public MicroModel.ServiceInjectionInfo[] getServiceInjections(java.lang.String name)
Get the service injection fields.- Returns:
- The field or method infos.
-
getServiceInjectionNames
public java.lang.String[] getServiceInjectionNames()
Get the service injection names.- Returns:
- The names.
-
addFeatureInjection
public void addFeatureInjection(java.lang.String name, FieldInfo field)
Add an injection field.- Parameters:
name
- The name.field
- The field.
-
getFeatureInjections
public FieldInfo[] getFeatureInjections()
Get the feature injection fields.- Returns:
- The fields.
-
addServiceCall
public void addServiceCall(ServiceCallInfo call)
Add an call field.- Parameters:
name
- The name.field
- The field.
-
getServiceCalls
public java.util.List<ServiceCallInfo> getServiceCalls()
Get the service call fields.- Returns:
- The field or method infos.
-
setServiceCalls
public void setServiceCalls(java.util.List<ServiceCallInfo> servicecalls)
Set the service calls.
-
getPojoClass
public ClassInfo getPojoClass()
Get the pojo class.- Returns:
- The pojoclass.
-
setPojoClass
public void setPojoClass(ClassInfo pojoclass)
Set the pojo class.- Parameters:
pojoclass
- The pojoclass to set
-
getClassloader
public java.lang.ClassLoader getClassloader()
Get the classloader.- Returns:
- the classloader.
-
setClassloader
public void setClassloader(java.lang.ClassLoader classloader)
Set the classloader.- Parameters:
classloader
- The classloader to set.
-
setAgentMethod
public void setAgentMethod(java.lang.Class<? extends java.lang.annotation.Annotation> ann, MethodInfo mi)
Set an agent method.
-
getAgentMethod
public MethodInfo getAgentMethod(java.lang.Class<? extends java.lang.annotation.Annotation> ann)
Get an agent method.
-
-