Example usage for org.objectweb.asm Opcodes ACC_STRICT

List of usage examples for org.objectweb.asm Opcodes ACC_STRICT

Introduction

In this page you can find the example usage for org.objectweb.asm Opcodes ACC_STRICT.

Prototype

int ACC_STRICT

To view the source code for org.objectweb.asm Opcodes ACC_STRICT.

Click Source Link

Usage

From source file:the.bytecode.club.bytecodeviewer.decompilers.bytecode.MethodNodeDecompiler.java

License:Open Source License

private static String getAccessString(int access) {
    // public, protected, private, abstract, static,
    // final, synchronized, native & strictfp are permitted
    List<String> tokens = new ArrayList<String>();
    if ((access & Opcodes.ACC_PUBLIC) != 0)
        tokens.add("public");
    if ((access & Opcodes.ACC_PRIVATE) != 0)
        tokens.add("private");
    if ((access & Opcodes.ACC_PROTECTED) != 0)
        tokens.add("protected");
    if ((access & Opcodes.ACC_STATIC) != 0)
        tokens.add("static");
    if ((access & Opcodes.ACC_ABSTRACT) != 0)
        tokens.add("abstract");
    if ((access & Opcodes.ACC_FINAL) != 0)
        tokens.add("final");
    if ((access & Opcodes.ACC_SYNCHRONIZED) != 0)
        tokens.add("synchronized");
    if ((access & Opcodes.ACC_NATIVE) != 0)
        tokens.add("native");
    if ((access & Opcodes.ACC_STRICT) != 0)
        tokens.add("strictfp");
    if ((access & Opcodes.ACC_BRIDGE) != 0)
        tokens.add("bridge");
    if ((access & Opcodes.ACC_VARARGS) != 0)
        tokens.add("varargs");
    if (tokens.size() == 0)
        return "";
    // hackery delimeters
    StringBuilder sb = new StringBuilder(tokens.get(0));
    for (int i = 1; i < tokens.size(); i++) {
        sb.append(" ");
        sb.append(tokens.get(i));/*from  ww w . java  2  s  .  c om*/
    }
    return sb.toString();
}