Package jadex.bdiv3

Class NodeHelper

  • Direct Known Subclasses:
    AsmNodeHelper

    public abstract class NodeHelper
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      NodeHelper()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract org.objectweb.asm.tree.FieldNode createField​(int access, java.lang.String name, java.lang.String desc, java.lang.String[] signature, java.lang.Object initialValue)  
      abstract org.objectweb.asm.tree.MethodNode createReturnConstantMethod​(java.lang.String methodName, int value)
      Creates a Method that always returns the given value.
      static NodeHelper getInstance()  
      int getLineNumberOfMethod​(org.objectweb.asm.tree.MethodNode mn)
      Returns the line number of the first LineNumberNode in the instructions of the given MethodNode, or -1, if none found.
      • Methods inherited from class java.lang.Object

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

      • NodeHelper

        public NodeHelper()
    • Method Detail

      • getInstance

        public static NodeHelper getInstance()
      • getLineNumberOfMethod

        public int getLineNumberOfMethod​(org.objectweb.asm.tree.MethodNode mn)
        Returns the line number of the first LineNumberNode in the instructions of the given MethodNode, or -1, if none found.
        Parameters:
        mn - The MethodNode to look into
        Returns:
        the line number or -1, if none found
      • createReturnConstantMethod

        public abstract org.objectweb.asm.tree.MethodNode createReturnConstantMethod​(java.lang.String methodName,
                                                                                     int value)
        Creates a Method that always returns the given value.
        Parameters:
        methodName -
        value -
        Returns:
        the new method
      • createField

        public abstract org.objectweb.asm.tree.FieldNode createField​(int access,
                                                                     java.lang.String name,
                                                                     java.lang.String desc,
                                                                     java.lang.String[] signature,
                                                                     java.lang.Object initialValue)