public class ASMBDIClassGenerator extends AbstractAsmBdiClassGenerator
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
|
java.util.List<java.lang.Class<?>> |
generateBDIClass(java.lang.String clname,
BDIModel model,
java.lang.ClassLoader cl)
Generate class.
|
java.util.List<java.lang.Class<?>> |
generateBDIClass(java.lang.String clname,
BDIModel model,
java.lang.ClassLoader cl,
java.util.Set<java.lang.String> 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) |
checkEnhanced, isAgentClass, isAgentOrCapa, isEnhanced, isGoal, 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 cl)
generateBDIClass
in interface IBDIClassGenerator
generateBDIClass
in class AbstractAsmBdiClassGenerator
public java.util.List<java.lang.Class<?>> generateBDIClass(java.lang.String clname, BDIModel model, java.lang.ClassLoader cl, java.util.Set<java.lang.String> done)
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)
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".public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception