Package com.sun.tools.classfile

Examples of com.sun.tools.classfile.Method


    void verifyBytecode(VarargsMethod selected) {
        bytecodeCheckCount++;
        File compiledTest = new File("Test.class");
        try {
            ClassFile cf = ClassFile.read(compiledTest);
            Method testMethod = null;
            for (Method m : cf.methods) {
                if (m.getName(cf.constant_pool).equals("test")) {
                    testMethod = m;
                    break;
                }
View Full Code Here


    void verifyBytecode(VarargsMethod selected, JavaSource source) {
        bytecodeCheckCount++;
        File compiledTest = new File("Test.class");
        try {
            ClassFile cf = ClassFile.read(compiledTest);
            Method testMethod = null;
            for (Method m : cf.methods) {
                if (m.getName(cf.constant_pool).equals("test")) {
                    testMethod = m;
                    break;
                }
View Full Code Here

    void verifyMethodHandleInvocationDescriptors(File f) {
        System.err.println("verify: " + f);
        try {
            int count = 0;
            ClassFile cf = ClassFile.read(f);
            Method testMethod = null;
            for (Method m : cf.methods) {
                if (m.getName(cf.constant_pool).equals(TEST_METHOD_NAME)) {
                    testMethod = m;
                    break;
                }
View Full Code Here

        //System.err.println("check " + className);
        InputStream in = jar.getInputStream(entry);
        ClassFile cf = ClassFile.read(in);
        in.close();
        for (int i = 0; i < cf.methods.length; i++) {
            Method m = cf.methods[i];
            if (m.access_flags.is(AccessFlags.ACC_NATIVE)) {
                // System.err.println(className);
                return true;
            }
        }
View Full Code Here

        //String className = name.substring(0, name.length() - 6).replace("/", ".");
        //System.err.println("check " + className);
        InputStream in = jar.getInputStream(entry);
        ClassFile cf = ClassFile.read(in);
        for (int i = 0; i < cf.methods.length; i++) {
            Method m = cf.methods[i];
            if (m.access_flags.is(AccessFlags.ACC_NATIVE)) {
                // System.err.println(className);
                return true;
            }
        }
View Full Code Here

        if (attr == null) {
            map = null;
            return;
        }

        Method m = classWriter.getMethod();
        Descriptor d = m.descriptor;
        String[] args;
        try {
            ConstantPool cp = classWriter.getClassFile().constant_pool;
            String argString = d.getParameterTypes(cp);
View Full Code Here

        attrWriter.write(attr, attr.attributes, constant_pool);
        indent(-1);
    }

    public void writeVerboseHeader(Code_attribute attr, ConstantPool constant_pool) {
        Method method = classWriter.getMethod();
        String argCount;
        try {
            int n = method.descriptor.getParameterCount(constant_pool);
            if (!method.access_flags.is(AccessFlags.ACC_STATIC))
                ++n;  // for 'this'
View Full Code Here

    void verifyMulticatchExceptionRanges(File f) {
        System.err.println("verify: " + f);
        try {
            int count = 0;
            ClassFile cf = ClassFile.read(f);
            Method testMethod = null;
            for (Method m : cf.methods) {
                if (m.getName(cf.constant_pool).equals(TEST_METHOD_NAME)) {
                    testMethod = m;
                    break;
                }
View Full Code Here

    void verifyLocalVariableTypeTableAttr(File f) {
        System.err.println("verify: " + f);
        try {
            ClassFile cf = ClassFile.read(f);
            Method testMethod = null;
            for (Method m : cf.methods) {
                if (m.getName(cf.constant_pool).equals(TEST_METHOD_NAME)) {
                    testMethod = m;
                    break;
                }
View Full Code Here

TOP

Related Classes of com.sun.tools.classfile.Method

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.