Available Methods
- INVOKEVIRTUAL
- INVOKESTATIC
- INVOKESPECIAL
- INVOKEINTERFACE
- ACC_PUBLIC
- PUTFIELD
- PUTSTATIC
- GETFIELD
- T_DOUBLE
- T_LONG
- ALOAD_3 ( )
- IFNULL
- T_CHAR
- ACC_STATIC
- T_FLOAT
- T_ARRAY
- INVOKEDYNAMIC
- ASTORE_2 ( )
- ALOAD_0 ( )
- IFNE
- IRETURN
- ASTORE_0 ( )
- DUP
- IFGE
- NEW
- CONSTANT_Long ( )
- GETSTATIC
- IF_ICMPEQ
- CONSTANT_String ( )
- IF_ICMPNE
- CONSTANT_NameAndType ( )
- LASTORE
- LSHL
- IFEQ
- ASTORE_3 ( )
- CONSTANT_InterfaceMethodref ( )
- IF_ACMPNE
- ACC_ABSTRACT
- IAND
- T_OBJECT
- T_BYTE
- ANEWARRAY
- CONSTANT_Utf8 ( )
- IF_ICMPGT
- IF_ACMPEQ
- LSUB
- T_INT
- UNPREDICTABLE
- IF_ICMPLE
- ILOAD_0 ( )
- ACC_VOLATILE
- LDC
- SAME_LOCALS_1_STACK_ITEM_FRAME ( )
- ACC_FINAL
- ICONST_0 ( )
- ATHROW
- AASTORE
- CASTORE
- IREM
- CONSTANT_MethodType ( )
- CONSTANT_Float ( )
- BASTORE
- ACONST_NULL
- LALOAD
- IADD
- RETURN
- LLOAD
- LDC_W
- ATTR_CONSTANT_VALUE
- ACC_SYNCHRONIZED
- FSUB
- GOTO
- GOTO_W
- T_VOID
- LRETURN
- CONSTANT_Fieldref ( )
- CONSTANT_Package ( )
- IALOAD
- ARETURN
- LAND
- IXOR
- DLOAD_2 ( )
- LDC2_W ( )
- ATTR_INNER_CLASSES
- CONSTANT_InvokeDynamic ( )
- CONSTANT_Class ( )
- ISTORE_3 ( )
- ISHR
- DCMPG
- NOP
- RET
- T_BOOLEAN
- LADD
- WIDE
- ISTORE
- ATTR_LINE_NUMBER_TABLE
- ATTR_MODULE
- ACC_TRANSIENT
- CONSTANT_Methodref ( )
- CONSTANT_Module ( )
- SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED ( )
- MULTIANEWARRAY
- ACC_SUPER
- LSTORE_2 ( )
- TABLESWITCH
- ACC_PROTECTED
- MONITOREXIT
- LREM
- IFNONNULL
- FSTORE_2 ( )
- JSR
- FRETURN
- ATTR_CODE
- ACC_INTERFACE
- ITEM_NewObject ( )
- IFLE
- SAME_LOCALS_1_STACK_ITEM_FRAME_MAX ( )
- FULL_FRAME
- ISTORE_2 ( )
- ACC_NATIVE
- DASTORE
- MONITORENTER
- LOR
- FMUL
- NEWARRAY
- ILOAD
- FLOAD
- ATTR_LOCAL_VARIABLE_TABLE
- CONSTANT_Integer ( )
- ACC_PRIVATE
- IF_ICMPGE
- DRETURN
- IOR
- IASTORE
- CONSTANT_Double ( )
- F2D ( )
- POP
Related Classes
- java.util.Collections
- java.util.Iterator
- java.util.Locale
- javax.annotation.Nonnull
- java.util.BitSet
- javax.annotation.CheckForNull
- javax.annotation.meta.When
- org.apache.bcel.classfile.JavaClass
- org.apache.bcel.Repository
- org.apache.bcel.classfile.Method
- org.apache.bcel.generic.Type
- org.apache.bcel.classfile.Field
- org.apache.bcel.generic.InstructionHandle
- org.apache.bcel.generic.ConstantPoolGen
- org.apache.bcel.generic.InstructionList
- org.apache.bcel.classfile.ConstantPool
- org.apache.bcel.generic.ObjectType
- org.apache.bcel.classfile.Constant
- org.apache.bcel.generic.MethodGen
- edu.umd.cs.findbugs.Priorities
- edu.umd.cs.findbugs.BugInstance
- org.apache.bcel.generic.Instruction
- org.apache.bcel.generic.INVOKESPECIAL
- org.apache.bcel.generic.ReferenceType
- org.apache.bcel.generic.GETFIELD
Java Code Examples for org.apache.bcel.Const#ATTR_CODE
The following examples show how to use
org.apache.bcel.Const#ATTR_CODE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Code.java From commons-bcel with Apache License 2.0 | 5 votes |
/** * @param name_index Index pointing to the name <em>Code</em> * @param length Content length in bytes * @param maxStack Maximum size of stack * @param maxLocals Number of local variables * @param code Actual byte code * @param exceptionTable of handled exceptions * @param attributes Attributes of code: LineNumber or LocalVariable * @param constant_pool Array of constants */ public Code(final int name_index, final int length, final int maxStack, final int maxLocals, final byte[] code, final CodeException[] exceptionTable, final Attribute[] attributes, final ConstantPool constant_pool) { super(Const.ATTR_CODE, name_index, length, constant_pool); this.maxStack = maxStack; this.maxLocals = maxLocals; this.code = code != null ? code : new byte[0]; this.exceptionTable = exceptionTable != null ? exceptionTable : new CodeException[0]; this.attributes = attributes != null ? attributes : new Attribute[0]; super.setLength(calculateLength()); // Adjust length }
Example 2
Source File: MethodHTML.java From commons-bcel with Apache License 2.0 | 4 votes |
private void writeMethod( final Method method, final int method_number ) { // Get raw signature final String signature = method.getSignature(); // Get array of strings containing the argument types final String[] args = Utility.methodSignatureArgumentTypes(signature, false); // Get return type string final String type = Utility.methodSignatureReturnType(signature, false); // Get method name final String name = method.getName(); String html_name; // Get method's access flags String access = Utility.accessToString(method.getAccessFlags()); // Get the method's attributes, the Code Attribute in particular final Attribute[] attributes = method.getAttributes(); /* HTML doesn't like names like <clinit> and spaces are places to break * lines. Both we don't want... */ access = Utility.replace(access, " ", " "); html_name = Class2HTML.toHTML(name); file.print("<TR VALIGN=TOP><TD><FONT COLOR=\"#FF0000\"><A NAME=method" + method_number + ">" + access + "</A></FONT></TD>"); file.print("<TD>" + Class2HTML.referenceType(type) + "</TD><TD>" + "<A HREF=" + className + "_code.html#method" + method_number + " TARGET=Code>" + html_name + "</A></TD>\n<TD>("); for (int i = 0; i < args.length; i++) { file.print(Class2HTML.referenceType(args[i])); if (i < args.length - 1) { file.print(", "); } } file.print(")</TD></TR>"); // Check for thrown exceptions for (int i = 0; i < attributes.length; i++) { attribute_html.writeAttribute(attributes[i], "method" + method_number + "@" + i, method_number); final byte tag = attributes[i].getTag(); if (tag == Const.ATTR_EXCEPTIONS) { file.print("<TR VALIGN=TOP><TD COLSPAN=2></TD><TH ALIGN=LEFT>throws</TH><TD>"); final int[] exceptions = ((ExceptionTable) attributes[i]).getExceptionIndexTable(); for (int j = 0; j < exceptions.length; j++) { file.print(constantHtml.referenceConstant(exceptions[j])); if (j < exceptions.length - 1) { file.print(", "); } } file.println("</TD></TR>"); } else if (tag == Const.ATTR_CODE) { final Attribute[] c_a = ((Code) attributes[i]).getAttributes(); for (int j = 0; j < c_a.length; j++) { attribute_html.writeAttribute(c_a[j], "method" + method_number + "@" + i + "@" + j, method_number); } } } }