public class ASMBDIClassGenerator extends AbstractAsmBdiClassGenerator
AbstractAsmBdiClassGenerator.MethodBeliefs
Modifier and Type | Field and Description |
---|---|
protected static java.lang.reflect.Method |
methoddc1 |
protected static java.lang.reflect.Method |
methoddc2 |
nodehelper, ophelper
AGENT_FIELD_NAME, DYNAMIC_BELIEF_UPDATEMETHOD_PREFIX, GLOBALNAME_FIELD_NAME, INIT_EXPRESSIONS_METHOD_PREFIX
Constructor and Description |
---|
ASMBDIClassGenerator() |
Modifier and Type | Method and Description |
---|---|
protected void |
enhanceSetter(java.lang.String iclname,
MethodNode mn,
java.lang.String belname)
Enhance setter method with unobserve oldvalue at the beginning and event call at the end
|
protected java.util.Set<java.lang.String> |
findBeliefs(ClassNode cn,
MethodNode mn,
BDIModel model,
java.util.Map<java.lang.String,ClassNode> others)
Find beliefs accessed in methods.
|
protected java.util.Set<java.lang.String> |
findParameters(ClassNode cn,
MethodNode mn,
BDIModel model,
java.util.Map<java.lang.String,ClassNode> others,
MGoal mgoal)
Find parameters accessed in methods.
|
java.util.List<java.lang.Class<?>> |
generateBDIClass(java.lang.String clname,
BDIModel model,
java.lang.ClassLoader dummycl)
Generate class.
|
java.util.List<java.lang.Class<?>> |
generateBDIClass(java.lang.String clname,
BDIModel model,
java.lang.ClassLoader dummycl,
java.util.Map<java.lang.String,ClassNode> done)
Generate class.
|
static void |
main(java.lang.String[] args) |
protected void |
makeObject(InsnList nl,
Type arg) |
protected void |
replaceNativeGetter(java.lang.String iclname,
MethodNode mn,
java.lang.String belname)
Replace native getter for abstract belief.
|
protected void |
replaceNativeSetter(java.lang.String iclname,
MethodNode mn,
java.lang.String belname)
Replace native setter for abstract belief.
|
java.lang.Class<?> |
toClass(java.lang.String name,
byte[] data,
java.lang.ClassLoader loader,
java.security.ProtectionDomain domain)
Transform byte Array into Class and define it in classloader.
|
protected void |
transformArrayStores(MethodNode mn,
BDIModel model,
java.lang.String iclname)
Transform array store instructions for beliefs.
|
protected void |
transformConstructor(ClassNode cn,
MethodNode mn,
BDIModel model,
java.util.List<java.lang.String> tododyn,
java.util.Map<java.lang.String,ClassNode> others) |
addBeliefEventsToConditions, checkEnhanced, findMethodBelief, getGoal, isAgentClass, isAgentOrCapa, isEnhanced, isGoal, isGoalClass, isPlan, isPlanClass, isPlanMethod, transformClassNode
protected static java.lang.reflect.Method methoddc1
protected static java.lang.reflect.Method methoddc2
public java.util.List<java.lang.Class<?>> generateBDIClass(java.lang.String clname, BDIModel model, java.lang.ClassLoader dummycl) throws JadexBDIGenerationException
generateBDIClass
in interface IBDIClassGenerator
generateBDIClass
in class AbstractAsmBdiClassGenerator
JadexBDIGenerationException
public java.util.List<java.lang.Class<?>> generateBDIClass(java.lang.String clname, BDIModel model, java.lang.ClassLoader dummycl, java.util.Map<java.lang.String,ClassNode> done) throws JadexBDIGenerationException
JadexBDIGenerationException
protected void replaceNativeGetter(java.lang.String iclname, MethodNode mn, java.lang.String belname)
AbstractAsmBdiClassGenerator
replaceNativeGetter
in class AbstractAsmBdiClassGenerator
protected void makeObject(InsnList nl, Type arg)
protected void replaceNativeSetter(java.lang.String iclname, MethodNode mn, java.lang.String belname)
AbstractAsmBdiClassGenerator
replaceNativeSetter
in class AbstractAsmBdiClassGenerator
protected void enhanceSetter(java.lang.String iclname, MethodNode mn, java.lang.String belname)
AbstractAsmBdiClassGenerator
enhanceSetter
in class AbstractAsmBdiClassGenerator
protected void transformConstructor(ClassNode cn, MethodNode mn, BDIModel model, java.util.List<java.lang.String> tododyn, java.util.Map<java.lang.String,ClassNode> others)
transformConstructor
in class AbstractAsmBdiClassGenerator
cn
- the class which contains the constructormn
- The Constructor method nodetododyn
- list of dynamic beliefsprotected void transformArrayStores(MethodNode mn, BDIModel model, java.lang.String iclname)
transformArrayStores
in class AbstractAsmBdiClassGenerator
public java.lang.Class<?> toClass(java.lang.String name, byte[] data, java.lang.ClassLoader loader, java.security.ProtectionDomain domain)
null
, if the class is not valid, such as Map.entry "inner Classes".protected java.util.Set<java.lang.String> findBeliefs(ClassNode cn, MethodNode mn, BDIModel model, java.util.Map<java.lang.String,ClassNode> others)
findBeliefs
in class AbstractAsmBdiClassGenerator
protected java.util.Set<java.lang.String> findParameters(ClassNode cn, MethodNode mn, BDIModel model, java.util.Map<java.lang.String,ClassNode> others, MGoal mgoal)
findParameters
in class AbstractAsmBdiClassGenerator
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception