Package javax.tools.diagnostics.runtime.java

Examples of javax.tools.diagnostics.runtime.java.JavaMethod


              jcName = Exceptions.getCorruptDataExceptionString();
            }
           
            while (itJavaMethod.hasNext())
            {
              JavaMethod jm = (JavaMethod)itJavaMethod.next();
              String name;
              String sig;
             
              try {
                name = jm.getName();
              } catch (CorruptDataException e) {
                name = Exceptions.getCorruptDataExceptionString();
              }
             
              try {
                sig = jm.getSignature();
              } catch (CorruptDataException e) {
                sig = Exceptions.getCorruptDataExceptionString();
              }

              if (jm.getCompiledSections().isEmpty()==false)
              {
                Iterator itImageSection = jm.getCompiledSections().iterator();
                while (itImageSection.hasNext())
                {
                  ImageSection is = (ImageSection)itImageSection.next();
                  long startAddr = is.getBaseAddress().getAddress();
                  long size = is.getSize();
View Full Code Here


          continue FRAMES;
        }
       
        if (location != null) {
          try {
            JavaMethod method = location.getMethod();
            if (clazz.equals(method.getDeclaringClass())) {
              list.add(thread);
              break FRAMES;
            }
          } catch (CorruptDataException e) {
            continue FRAMES;
View Full Code Here

        //go to the next iteration
        continue;
      }
      Iterator methods = jClass.getDeclaredMethods().iterator();
      while(methods.hasNext()){
        JavaMethod jMethod = (JavaMethod)methods.next();
        Iterator bytecodeSections = jMethod.getBytecodeSections().iterator();
        Iterator compiledSections = jMethod.getCompiledSections().iterator();
        isWithinImageSections(bytecodeSections, jMethod, false, address);
        isWithinImageSections(compiledSections, jMethod, true, address);
      }
    }
  }
View Full Code Here

  }
 
  public static void printMethods(Iterator methods, Output out)
  {
    while(methods.hasNext()) {
      JavaMethod jMethod = (JavaMethod)methods.next();
      try{
        out.print("Bytecode range(s): ");
        Iterator imageSections = jMethod.getBytecodeSections().iterator();
        boolean firstSectionPassed = false;
        while (imageSections.hasNext()){
          ImageSection is = (ImageSection)imageSections.next();
          long baseAddress = is.getBaseAddress().getAddress();
          long endAddress = baseAddress + is.getSize();
          if (firstSectionPassed) {
            out.print(", ");
          }
          out.print(Long.toHexString(baseAddress) + " -- " +
              Long.toHexString(endAddress));
          firstSectionPassed = true;
        }
        out.print(":  ");
       
       
        String signature;
       
        try {
          out.print(Utils.getModifierString(jMethod.getModifiers()));
        } catch (CorruptDataException e) {
          out.print(Exceptions.getCorruptDataExceptionString());
        }

        try {
          signature = jMethod.getSignature();
        } catch (CorruptDataException e) {
          out.print(Exceptions.getCorruptDataExceptionString());
          signature = null;
        }
        if (null != signature)
        {
          String name = Utils.getReturnValueName(signature);
          if (null == name) {
            out.print("<unknown>");
          } else {
            out.print(name);
          }
        }
       
        out.print(" ");
        out.print(jMethod.getName());

        if (null != signature)
        {
          String name = Utils.getMethodSignatureName(signature);
          if (null == name) {
View Full Code Here

TOP

Related Classes of javax.tools.diagnostics.runtime.java.JavaMethod

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.