object ConstantsBuffer
Factory methods and helper methods to create a valid ConstantsBuffer.
- Source
- ConstantsBuffer.scala
- Alphabetic
- By Inheritance
- ConstantsBuffer
- 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 apply(ldcs: Set[LDC[_]]): ConstantsBuffer
Creates a new ConstantsBuffer which is already preinitialized to contain the constants defined by the respective org.opalj.br.instructions.LDC instructions.
Creates a new ConstantsBuffer which is already preinitialized to contain the constants defined by the respective org.opalj.br.instructions.LDC instructions.
This is necessary to ensure that these entries are assigned values less than 255, because the constant pool reference used by LDC instructions is just one unsigned byte.
- ldcs
The set of unique LDC instructions. For each constant referred to by an LDC instruction we (need to) create the required
ConstantPool
entry right away to ensure the index is an unsigned byte value. To collect a org.opalj.br.ClassFile's ldc instructions use collectLDCs.
- Annotations
- @throws("if it is impossible to create a valid constant pool")
- Note
If a class has more than 254 unique constants and all of them use simple
LDC
(not LDC_W) instructions, a ConstantPoolException will be thrown. Furthermore, a ConstantPoolException is thrown if the maximum size of the pool (65535 entries) is exceeded.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def collectLDCs(classFile: ClassFile): Set[LDC[_]]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def getOrCreateCPEntry(ldc: LDC[_])(implicit constantsBuffer: ConstantsBuffer): Int
- Annotations
- @throws(scala.this.throws.<init>$default$1[org.opalj.br.cp.ConstantPoolException])
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- 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