Package jadex.bdiv3

Class AbstractAsmBdiClassGenerator

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addBeliefEventsToConditions​(org.objectweb.asm.tree.ClassNode cn, java.lang.ClassLoader dummycl, java.util.List<MCondition> conditions, MultiCollection<java.lang.String,​AbstractAsmBdiClassGenerator.MethodBeliefs> methodbeliefs, MultiCollection<java.lang.String,​AbstractAsmBdiClassGenerator.MethodBeliefs> methodparams, BDIModel model)  
      protected abstract void enhanceSetter​(java.lang.String iclname, org.objectweb.asm.tree.MethodNode setter, java.lang.String belname)
      Enhance setter method with unobserve oldvalue at the beginning and event call at the end
      protected abstract 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 the beliefs used in a method.
      protected AbstractAsmBdiClassGenerator.MethodBeliefs findMethodBelief​(java.util.Collection<AbstractAsmBdiClassGenerator.MethodBeliefs> mbs, java.lang.reflect.Method m, java.lang.reflect.Constructor<?> c)  
      protected abstract 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 the beliefs used in a method.
      abstract java.util.List<java.lang.Class<?>> generateBDIClass​(java.lang.String clname, BDIModel micromodel, java.lang.ClassLoader cl)
      Generate class, including inner classes.
      protected MGoal getGoal​(org.objectweb.asm.tree.ClassNode cn, BDIModel model, java.lang.ClassLoader cl)
      Get a goal per class node.
      protected boolean isAgentClass​(org.objectweb.asm.tree.ClassNode classNode)
      Check whether a given ClassNode is an Agent (or Capability) class.
      protected boolean isAgentOrCapa​(java.lang.String annotationDescription)
      Check whether a given Annotation marks an Agent or Capability.
      protected boolean isGoal​(java.lang.String annotationDescription)
      Check whether a given Annotation marks a goal.
      protected boolean isGoalClass​(org.objectweb.asm.tree.ClassNode classNode)  
      protected boolean isPlan​(java.lang.String annotationDescription)
      Check whether a given Annotation marks a plan.
      protected boolean isPlanClass​(org.objectweb.asm.tree.ClassNode classNode)  
      protected boolean isPlanMethod​(org.objectweb.asm.tree.MethodNode methodNode)  
      protected abstract void replaceNativeGetter​(java.lang.String iclname, org.objectweb.asm.tree.MethodNode nativeGetter, java.lang.String belname)
      Replace native getter for abstract belief.
      protected abstract void replaceNativeSetter​(java.lang.String iclname, org.objectweb.asm.tree.MethodNode nativeSetter, java.lang.String belname)
      Replace native setter for abstract belief.
      protected abstract void transformArrayStores​(org.objectweb.asm.tree.MethodNode mn, BDIModel model, java.lang.String iclname)  
      protected void transformClassNode​(org.objectweb.asm.tree.ClassNode cn, java.lang.String iclname, BDIModel model, java.lang.ClassLoader dummycl, java.util.Map<java.lang.String,​org.objectweb.asm.tree.ClassNode> others)  
      protected abstract 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractAsmBdiClassGenerator

        public AbstractAsmBdiClassGenerator()
    • Method Detail

      • transformClassNode

        protected void transformClassNode​(org.objectweb.asm.tree.ClassNode cn,
                                          java.lang.String iclname,
                                          BDIModel model,
                                          java.lang.ClassLoader dummycl,
                                          java.util.Map<java.lang.String,​org.objectweb.asm.tree.ClassNode> others)
        Parameters:
        cn -
        iclname -
        model -
      • getGoal

        protected MGoal getGoal​(org.objectweb.asm.tree.ClassNode cn,
                                BDIModel model,
                                java.lang.ClassLoader cl)
        Get a goal per class node.
        Parameters:
        cn -
        Returns:
      • transformArrayStores

        protected abstract void transformArrayStores​(org.objectweb.asm.tree.MethodNode mn,
                                                     BDIModel model,
                                                     java.lang.String iclname)
      • transformConstructor

        protected abstract 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)
        Parameters:
        cn - the class which contains the constructor
        mn - The Constructor method node
        model -
        tododyn - list of dynamic beliefs
      • replaceNativeGetter

        protected abstract void replaceNativeGetter​(java.lang.String iclname,
                                                    org.objectweb.asm.tree.MethodNode nativeGetter,
                                                    java.lang.String belname)
        Replace native getter for abstract belief.
        Parameters:
        iclname -
        nativeSetter -
        belname -
      • replaceNativeSetter

        protected abstract void replaceNativeSetter​(java.lang.String iclname,
                                                    org.objectweb.asm.tree.MethodNode nativeSetter,
                                                    java.lang.String belname)
        Replace native setter for abstract belief.
        Parameters:
        iclname -
        nativeSetter -
        belname -
      • enhanceSetter

        protected abstract void enhanceSetter​(java.lang.String iclname,
                                              org.objectweb.asm.tree.MethodNode setter,
                                              java.lang.String belname)
        Enhance setter method with unobserve oldvalue at the beginning and event call at the end
        Parameters:
        iclname -
        setter -
        belname -
      • findBeliefs

        protected abstract 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 the beliefs used in a method.
      • findParameters

        protected abstract 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 the beliefs used in a method.
      • isAgentClass

        protected boolean isAgentClass​(org.objectweb.asm.tree.ClassNode classNode)
        Check whether a given ClassNode is an Agent (or Capability) class.
        Parameters:
        classNode -
        Returns:
        true, if the given classNode is an Agent or Capability class.
      • isAgentOrCapa

        protected boolean isAgentOrCapa​(java.lang.String annotationDescription)
        Check whether a given Annotation marks an Agent or Capability.
        Parameters:
        annotationDescription - description of the annotation
        Returns:
        true, if the given annotationDescription marks an Agent or Capability class.
      • isGoal

        protected boolean isGoal​(java.lang.String annotationDescription)
        Check whether a given Annotation marks a goal.
        Parameters:
        annotationDescription - description of the annotation
        Returns:
        true, if the given annotationDescription marks a goal.
      • isPlan

        protected boolean isPlan​(java.lang.String annotationDescription)
        Check whether a given Annotation marks a plan.
        Parameters:
        annotationDescription - description of the annotation
        Returns:
        true, if the given annotationDescription marks a plan.
      • isPlanClass

        protected boolean isPlanClass​(org.objectweb.asm.tree.ClassNode classNode)
        Parameters:
        classNode -
        Returns:
      • isGoalClass

        protected boolean isGoalClass​(org.objectweb.asm.tree.ClassNode classNode)
        Parameters:
        classNode -
        Returns:
      • isPlanMethod

        protected boolean isPlanMethod​(org.objectweb.asm.tree.MethodNode methodNode)
        Parameters:
        methodNode -
        Returns: