Package net.sf.rej.gui.structure

Examples of net.sf.rej.gui.structure.MethodNode


      FieldNode fNode = (FieldNode) node;
      return this.offsets.get(fNode.getField());
    } else if (node instanceof MethodsNode) {
      return this.offsets.get(ClassFile.OffsetTag.METHOD_DATA);
    } else if (node instanceof MethodNode) {
      MethodNode mNode = (MethodNode) node;
      return this.offsets.get(mNode.getMethod());
    } else if (node instanceof MethodAccessFlagsNode) {
      Range parentRange = getRange((StructureNode)node.getParent());
      MethodAccessFlagsNode mafNode = (MethodAccessFlagsNode) node;
      Method method = mafNode.getMethod();
      Range afRange = method.getOffsetMap().get(Method.OffsetTag.ACCESS_FLAGS);
      return afRange.offsetBy(parentRange.getOffset());
    } else if (node instanceof MethodNameNode) {
      Range parentRange = getRange((StructureNode)node.getParent());
      MethodNameNode mafNode = (MethodNameNode) node;
      Method method = mafNode.getMethod();
      Range afRange = method.getOffsetMap().get(Method.OffsetTag.METHOD_NAME);
      return afRange.offsetBy(parentRange.getOffset());
    } else if (node instanceof MethodDescriptorNode) {     
      Range parentRange = getRange((StructureNode)node.getParent());
      MethodDescriptorNode mafNode = (MethodDescriptorNode) node;
      Method method = mafNode.getMethod();
      Range afRange = method.getOffsetMap().get(Method.OffsetTag.METHOD_DESCRIPTOR);
      return afRange.offsetBy(parentRange.getOffset());
    } else if (node instanceof AttributeNode) {
      AttributeNode aNode = (AttributeNode) node;
      AttributesNode an = (AttributesNode) aNode.getParent();
      Range range = getRange(an);
      Map<Object, Range> map = an.getAttributesObject().getOffsetMap(range.getOffset());
      return map.get(aNode.getAttributeObject());
    } else if (node instanceof AttributesNode) {
      StructureNode parent = (StructureNode) node.getParent();
      if (parent instanceof ClassFileNode) {
        return this.offsets.get(ClassFile.OffsetTag.ATTRIBUTES);
      } else if (parent instanceof MethodNode) {
        MethodNode mNode = (MethodNode) parent;
        Range parentRange = getRange(parent);
        Map<Object, Range> map = mNode.getMethod().getOffsetMap();
        return map.get(Method.OffsetTag.ATTRIBUTES).offsetBy(parentRange.getOffset());
      } else if (parent instanceof FieldNode) {
        FieldNode fNode = (FieldNode) parent;
        Range parentRange = getRange(parent);
        Map<Object, Range> map = fNode.getField().getOffsetMap();
View Full Code Here

TOP

Related Classes of net.sf.rej.gui.structure.MethodNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.