class CodeAttributeBuilder[T] extends br.CodeAttributeBuilder[(Map[PC, T], List[String])]
Builder for the org.opalj.br.Code attribute with all its properties. The Builder is created using the CODE factory.
The max_stack
and max_locals
values will be calculated if not explicitly defined.
- Alphabetic
- By Inheritance
- CodeAttributeBuilder
- CodeAttributeBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def MAXLOCALS(value: Int): CodeAttributeBuilder.this.type
Defines the max_locals value.
Defines the max_locals value.
(This overrides/disables the automatic computation of this value.)
- def MAXSTACK(value: Int): CodeAttributeBuilder.this.type
Defines the max_stack value.
Defines the max_stack value.
(This overrides/disables the automatic computation of this value.)
- def apply(classFileVersion: UShortPair, declaringClassType: ObjectType, accessFlags: Int, name: String, descriptor: MethodDescriptor)(implicit classHierarchy: ClassHierarchy): (Code, (Map[PC, T], List[String]))
Creates a
Code
attribute.Creates a
Code
attribute.The
classHierarchy
is required iff a Java 6 or newer class file is created and the code requires the computation of a new stack map table. If this is not the case the class hierarchy can benull
.- classFileVersion
The class file version determines which attributes are allowed/ required. In particular required to determine if a org.opalj.br.StackMapTable attribute needs to be computed.
- accessFlags
The declaring method's access flags, required during code validation or when MAXSTACK/MAXLOCALS needs to be computed.
- name
The name of the method.
- descriptor
The declaring method's descriptor; required during code validation or when MAXSTACK/MAXLOCALS needs to be computed.
- classHierarchy
Required if a new org.opalj.br.StackMapTable attribute needs to be computed.
- returns
The tuple:
(the code attribute, (the extracted meta information, the list of warnings))
.
- Definition Classes
- CodeAttributeBuilder → CodeAttributeBuilder
- def apply(classFileVersion: UShortPair, method: Method)(implicit classHierarchy: ClassHierarchy = br.ClassHierarchy.PreInitializedClassHierarchy): (Code, (Map[PC, T], List[String]))
Creates a
Code
attribute with respect to the given method; this is particularly useful when we do bytecode weaving.Creates a
Code
attribute with respect to the given method; this is particularly useful when we do bytecode weaving.- classFileVersion
The version of the class file to which the returned will be added eventually.
- See also
apply(classFileVersion:UShortPair,accessFlags:Int,name:String,...)
for more details.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bytecodeInstructions: Iterator[Instruction]
Returns an iterator over the code array; hence, will return
null
values whenever an instruction requires more than one byte in the array! - def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def copy(attributes: Attributes = this.attributes): CodeAttributeBuilder[T]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def foreachInstructionWithIndex[U](f: (IntRefPair[Instruction]) => U): Unit
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def instruction(index: Int): Instruction
- def instructionsLength: Int
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated