Package com.sun.jdi

Examples of com.sun.jdi.ReferenceType


      handledJdwpRequest();
    }
  }

  private boolean isAValidMethod(Method method) {
    ReferenceType refType = referenceType();
    if (refType instanceof ArrayType) {
      // if the object is an array, check if the method is declared in
      // java.lang.Object
      return "java.lang.Object".equals(method.declaringType().name()); //$NON-NLS-1$
    }
    return refType.allMethods().contains(method);
  }
View Full Code Here


                throw new Error("target JVM cannot redefine classes, please force the use of -Xbootclasspath");
            }
            List classList = vm.classesByName(className);
            if (classList.size() == 0)
                throw new Error("Fatal error: Can't find class " + className);
            ReferenceType rt = (ReferenceType)classList.get(0);
            Map map = new HashMap();
            map.put(rt, bytes);
            Method doM = VirtualMachine.class.getMethod("redefineClasses", new Class[]{Map.class});
            doM.invoke(vm, new Object[]{map});
        }
View Full Code Here

  private PsiFile getPsiFileByLocation(final Project project, final Location location) {
    final Ref<PsiFile> result = new Ref<PsiFile>(null);
    ApplicationManager.getApplication().runReadAction(new Runnable() {
      public void run() {
        if (location == null) return;
        final ReferenceType refType = location.declaringType();
        if (refType == null) return;

        String fileName = null;
        try {
          fileName = location.sourceName();
        } catch (AbsentInformationException ignore) {}

        final String originalQName = refType.name().replace('/', '.');
        final GlobalSearchScope searchScope = myDebugProcess.getSearchScope();
        int dollar = originalQName.indexOf('$');
        final String qName = dollar >= 0 ? originalQName.substring(0, dollar) : originalQName;
        final ClNs[] nses = ClojureShortNamesCache.getInstance(project).getNsByQualifiedName(qName, searchScope);
        if (nses.length == 1) {
View Full Code Here

        }
        try {
            List<ReferenceType> classesByName = vm.classesByName(breakpoint.getClassInfo().getDotName());
            if (classesByName.size() >= 1) {
                // Get the bytecode locations of the line number.
                ReferenceType ref = classesByName.get(0);
                try {
                    List<Location> locations = ref.locationsOfLine(breakpoint.getLineNumber());

                    // Set a breakpoint at the first location.
                    if (locations.size() >= 1) {
                        EventRequestManager mgr = vm.eventRequestManager();
                        BreakpointRequest req = mgr.createBreakpointRequest(locations.get(0));
View Full Code Here

            }
            List classList = vm.classesByName(className);
            if (classList.size() == 0) {
                throw new Error("Fatal error: Can't find class " + className);
            }
            ReferenceType rt = (ReferenceType) classList.get(0);
            Map map = new HashMap();
            map.put(rt, bytes);
            Method doM = VirtualMachine.class.getMethod("redefineClasses", new Class[] {
                Map.class
            });
View Full Code Here

            }
            List classList = vm.classesByName(className);
            if (classList.size() == 0) {
                throw new Error("Fatal error: Can't find class " + className);
            }
            ReferenceType rt = (ReferenceType)classList.get(0);
            Map map = new HashMap();
            map.put(rt, bytes);
            Method doM = VirtualMachine.class.getMethod("redefineClasses", new Class[]{Map.class});
            doM.invoke(vm, new Object[]{map});
        } catch (NoSuchMethodException e) {
View Full Code Here

TOP

Related Classes of com.sun.jdi.ReferenceType

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.