Package jadex.bdiv3

Class ASMBDIClassGenerator

    • Constructor Detail

      • ASMBDIClassGenerator

        public ASMBDIClassGenerator()
    • Method Detail

      • generateBDIClass

        public java.util.List<java.lang.Class<?>> generateBDIClass​(java.lang.String clname,
                                                                   BDIModel model,
                                                                   java.lang.ClassLoader dummycl,
                                                                   java.util.Map<java.lang.String,​org.objectweb.asm.tree.ClassNode> done)
                                                            throws JadexBDIGenerationException
        Generate class.
        Throws:
        JadexBDIGenerationException
      • enhanceSetter

        protected void enhanceSetter​(java.lang.String iclname,
                                     org.objectweb.asm.tree.MethodNode mn,
                                     java.lang.String belname)
        Description copied from class: AbstractAsmBdiClassGenerator
        Enhance setter method with unobserve oldvalue at the beginning and event call at the end
        Specified by:
        enhanceSetter in class AbstractAsmBdiClassGenerator
      • transformConstructor

        protected void transformConstructor​(org.objectweb.asm.tree.ClassNode cn,
                                            org.objectweb.asm.tree.MethodNode mn,
                                            BDIModel model,
                                            java.util.List<java.lang.String> tododyn,
                                            java.util.Map<java.lang.String,​org.objectweb.asm.tree.ClassNode> others)
        Specified by:
        transformConstructor in class AbstractAsmBdiClassGenerator
        Parameters:
        cn - the class which contains the constructor
        mn - The Constructor method node
        tododyn - list of dynamic beliefs
      • toClass

        public 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.
        Returns:
        the loaded class or null, if the class is not valid, such as Map.entry "inner Classes".
      • toClass

        public java.lang.Class<?> toClass​(java.lang.String name,
                                          byte[] data,
                                          java.lang.ClassLoader loader,
                                          java.security.ProtectionDomain domain,
                                          boolean redefine)
        Transform byte Array into Class and define it in classloader.
        Returns:
        the loaded class or null, if the class is not valid, such as Map.entry "inner Classes".
      • findBeliefs

        protected java.util.Set<java.lang.String> findBeliefs​(org.objectweb.asm.tree.ClassNode cn,
                                                              org.objectweb.asm.tree.MethodNode mn,
                                                              BDIModel model,
                                                              java.util.Map<java.lang.String,​org.objectweb.asm.tree.ClassNode> others)
        Find beliefs accessed in methods.
        Specified by:
        findBeliefs in class AbstractAsmBdiClassGenerator
      • findParameters

        protected java.util.Set<java.lang.String> findParameters​(org.objectweb.asm.tree.ClassNode cn,
                                                                 org.objectweb.asm.tree.MethodNode mn,
                                                                 BDIModel model,
                                                                 java.util.Map<java.lang.String,​org.objectweb.asm.tree.ClassNode> others,
                                                                 MGoal mgoal)
        Find parameters accessed in methods.
        Specified by:
        findParameters in class AbstractAsmBdiClassGenerator
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception