Examples of VmMethod


Examples of org.jnode.vm.classmgr.VmMethod

    /**
     * @see java.io.ObjectStreamClass#hasStaticInitializer(java.lang.Class)
     */
    private static boolean hasStaticInitializer(Class<?> clazz) {
        VmType<?> vmt = VmType.fromClass(clazz);
        VmMethod met = vmt.getDeclaredMethod("<clinit>", "()V");
        return met != null && met.isStatic();
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmMethod

    private static StackTraceElement getStackTraceElement(Throwable instance, int index) {
        final VmStackFrame frame = (VmStackFrame) ((Object[]) ObjectReference.fromObject(instance).toAddress().add(BACKTRACE_OFFSET).
                loadObjectReference().toObject())[index];
        final String location = frame.getLocationInfo();
        final int lineNumber = "?".equals(location) ? -1 : Integer.parseInt(location);
        final VmMethod method = frame.getMethod();
        final VmType<?> vmClass = (method == null) ? null : method.getDeclaringClass();
        final String fname = (vmClass == null) ? null : vmClass.getSourceFile();
        final String cname = (vmClass == null) ? "<unknown class>" : vmClass.getName();
        final String mname = (method == null) ? "<unknown method>" : method.getName();
        return new StackTraceElement(cname, mname, fname, method == null || method.isNative() ? -2 : lineNumber);
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmMethod

        final StackTraceElement[] trace = new StackTraceElement[length];
        for(int i = length; i-- > 0; ){
            final VmStackFrame frame = vm_trace[i];
            final String location = frame.getLocationInfo();
            final int lineNumber = "?".equals(location) ? -1 : Integer.parseInt(location);
            final VmMethod method = frame.getMethod();
            final VmType<?> vmClass = (method == null) ? null : method.getDeclaringClass();
            final String fname = (vmClass == null) ? null : vmClass.getSourceFile();
            final String cname = (vmClass == null) ? "<unknown class>" : vmClass.getName();
            final String mname = (method == null) ? "<unknown method>" : method.getName();
            trace[i] = new StackTraceElement(cname, mname, fname, method == null || method.isNative() ? -2 : lineNumber);
        }
        return trace;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.