Package

org.opalj

ba

Permalink

package ba

Implementation of an eDSL for creating Java bytecode. The eDSL is designed to facilitate the creation of correct class files; i.e., whenever possible it tries to fill wholes. For example, when an interface is specified the library automatically ensures that the super class type is (initially) set to java.lang.Object as required by the JVM specification.

This package in particular provides functionality to convert org.opalj.br classes to org.opalj.da classes.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ba
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class AccessModifier extends AnyVal

    Permalink

    Represents the access flags of a class, method or field declaration.

    Represents the access flags of a class, method or field declaration.

    All standard access flags are predefined.

    Example:
    1. To create a class file's, a field's or a method's access modifier, you can chain them using post fix notation, e.g.:

      PUBLIC FINAL

      or you just append the using '.', e.g.:

      PUBLIC.FINAL.SYNTHETIC.VARARGS
  2. case class AnnotatedInstructionElement[T](instruction: InstructionLike, annotation: T) extends InstructionLikeElement[T] with Product with Serializable

    Permalink

    Wrapper for annotated org.opalj.br.instructions.InstructionLikes.

  3. implicit final class BRConstantsBuffer extends AnyVal

    Permalink
  4. class CATCH extends PseudoInstruction with ExceptionHandlerElement

    Permalink

    Pseudo instruction marking the handler of a org.opalj.br.ExceptionHandler.

    Pseudo instruction marking the handler of a org.opalj.br.ExceptionHandler.

    See also

    ExceptionHandlerElement

  5. class CLASS[T] extends AnyRef

    Permalink

    Builder for org.opalj.br.ClassFile objects.

  6. class CodeAttributeBuilder[T] extends br.CodeAttributeBuilder[(Map[PC, T], List[String])]

    Permalink

    Builder for the org.opalj.br.Code attribute with all its properties.

    Builder for the org.opalj.br.Code attribute with all its properties. Instantiation is only possible with the CODE factory. The max_stack and max_locals values will be calculated if not explicitly defined.

  7. trait CodeElement[+T] extends AnyRef

    Permalink

    Wrapper for elements that will generate the instructions and attributes of a org.opalj.br.Code and the annotations of the bytecode.

    Wrapper for elements that will generate the instructions and attributes of a org.opalj.br.Code and the annotations of the bytecode.

    T

    The type of the annotations of instructions.

    See also

    org.opalj.ba.PseudoInstruction

    org.opalj.ba.AnnotatedInstructionElement

    org.opalj.ba.InstructionElement

  8. case class EXCEPTIONS(exceptionTypes: String*) extends MethodAttributeBuilder with Product with Serializable

    Permalink

    Builder for the org.opalj.br.ExceptionTable attribute.

  9. trait ExceptionHandlerElement extends PseudoInstruction

    Permalink

    Pseudo instructions which generate the org.opalj.br.ExceptionHandler of the org.opalj.br.Code attribute.

    Pseudo instructions which generate the org.opalj.br.ExceptionHandler of the org.opalj.br.Code attribute. An ExceptionHandler is composed of the three pseudo instructions TRY, TRYEND and CATCH with the same identifier symbol. The exceptionHandler includes all instructions between TRY and TRYEND. The handlerPC is the pc of the instruction following the CATCH. If the label contains numbers at the end, the ExceptionHandlers are sorted ascending by that number in the ExceptionHandlerTable. Otherwise, the ExceptionHandlers are lexically sorted by their label.

  10. class ExceptionHandlerGenerator extends AnyRef

    Permalink

    Incrementally builds the org.opalj.br.ExceptionHandlers from the added pseudo instructions (ExceptionHandlerElement) representing an org.opalj.br.ExceptionHandler.

  11. case class FIELD(accessModifiers: AccessModifier, name: String, descriptor: String, attributesBuilders: Seq[FieldAttributeBuilder] = Seq.empty) extends Product with Serializable

    Permalink

    Builder for a org.opalj.br.Field; a FIELD object is intended to be stored in a org.opalj.ba.FIELDS collection.

  12. case class FIELDS(fields: FIELD*) extends Product with Serializable

    Permalink

    Builder for a sequence of org.opalj.br.Fields.

  13. case class InstructionElement(instruction: InstructionLike) extends InstructionLikeElement[Nothing] with Product with Serializable

    Permalink

    Wrapper for org.opalj.br.instructions.InstructionLikes.

  14. sealed abstract class InstructionLikeElement[T] extends CodeElement[T]

    Permalink

  15. case class LINENUMBER(lineNumber: Int) extends PseudoInstruction with Product with Serializable

    Permalink

    Pseudo instruction that generates an entry in the org.opalj.br.LineNumberTable with the program counter of the following instruction.

  16. case class LabelElement(label: Symbol) extends PseudoInstruction with Product with Serializable

    Permalink

    Wrapper for Symbols (labels) representing branch targets.

  17. class LineNumberTableBuilder extends AnyRef

    Permalink

    Used to incrementally build the org.opalj.br.UnpackedLineNumberTable.

  18. class METHOD[T] extends AnyRef

    Permalink

    Builder for a org.opalj.br.MethodTemplate.

  19. class METHODS[T] extends AnyRef

    Permalink

    Builder for a list of org.opalj.br.MethodTemplates.

  20. abstract class PseudoInstruction extends CodeElement[Nothing]

    Permalink

    Marker trait for labels (scala.Symbol) and pseudo instructions generating Code attributes.

  21. case class TRY(id: Symbol) extends PseudoInstruction with ExceptionHandlerElement with Product with Serializable

    Permalink

    Pseudo instruction marking the start of a org.opalj.br.ExceptionHandler.

    Pseudo instruction marking the start of a org.opalj.br.ExceptionHandler.

    See also

    ExceptionHandlerElement

  22. case class TRYEND(id: Symbol) extends PseudoInstruction with ExceptionHandlerElement with Product with Serializable

    Permalink

    Pseudo instruction marking the end of a org.opalj.br.ExceptionHandler.

    Pseudo instruction marking the end of a org.opalj.br.ExceptionHandler.

    See also

    ExceptionHandlerElement

  23. case class ToDAConfig(retainOPALAttributes: Boolean = false, retainUnknownAttributes: Boolean = false) extends Product with Serializable

    Permalink

    Configures how specific kinds of attributes are handled during the serialization process.

Value Members

  1. final val ABSTRACT: AccessModifier

    Permalink
  2. final val ANNOTATION: AccessModifier

    Permalink
  3. final val BRIDGE: AccessModifier

    Permalink
  4. object CATCH

    Permalink

    Factory methods to create an CATCH pseudo instruction.

  5. object CLASS

    Permalink
  6. object CODE

    Permalink

    Factory method for creating a CodeAttributeBuilder.

  7. object CodeAttributeBuilder

    Permalink
  8. object CodeElement

    Permalink

    Implicit conversions to CodeElement.

  9. final val ENUM: AccessModifier

    Permalink
  10. final val FINAL: AccessModifier

    Permalink
  11. final val INTERFACE: AccessModifier

    Permalink
  12. object InstructionLikeElement

    Permalink
  13. object METHOD

    Permalink
  14. object METHODS

    Permalink
  15. final val NATIVE: AccessModifier

    Permalink
  16. final val PRIVATE: AccessModifier

    Permalink
  17. final val PROTECTED: AccessModifier

    Permalink
  18. final val PUBLIC: AccessModifier

    Permalink
  19. final val STATIC: AccessModifier

    Permalink
  20. final val STRICT: AccessModifier

    Permalink
  21. final val SUPER: AccessModifier

    Permalink
  22. final val SYNCHRONIZED: AccessModifier

    Permalink
  23. final val SYNTHETIC: AccessModifier

    Permalink
  24. final val TRANSIENT: AccessModifier

    Permalink
  25. object ToDAConfig extends Serializable

    Permalink
  26. final val VARARGS: AccessModifier

    Permalink
  27. final val VOLATILE: AccessModifier

    Permalink
  28. implicit def attributeToClassFileAttributeBuilder(a: Attribute): ClassFileAttributeBuilder

    Permalink
  29. implicit def attributeToFieldAttributeBuilder(a: Attribute): FieldAttributeBuilder

    Permalink
  30. implicit def attributeToMethodAttributeBuilder(a: Attribute): MethodAttributeBuilder

    Permalink
  31. implicit def codeAttributeBuilderToSome[T](b: br.CodeAttributeBuilder[T]): Some[br.CodeAttributeBuilder[T]]

    Permalink
  32. def createBoostrapMethodTableAttribute(constantsPool: ConstantsPool): Attribute

    Permalink
  33. implicit def methodAttributeBuilderToSeq(b: MethodAttributeBuilder): Seq[MethodAttributeBuilder]

    Permalink
  34. def toDA(constantPool: Array[Constant_Pool_Entry]): Array[Constant_Pool_Entry]

    Permalink
  35. def toDA(attribute: Attribute)(implicit constantsBuffer: ConstantsBuffer, config: ToDAConfig): Option[Attribute]

    Permalink

    Converts the given org.opalj.br.Attribute to a org.opalj.da.Attribute using the given configuration.

    Converts the given org.opalj.br.Attribute to a org.opalj.da.Attribute using the given configuration.

    See also

    org.opalj.br.Attribute#kindId for the list of all supported attributes.

  36. def toDA(typeAnnotation: TypeAnnotation)(implicit constantsBuffer: ConstantsBuffer, config: ToDAConfig): TypeAnnotation

    Permalink
  37. def toDA(typeAnnotationPath: TypeAnnotationPath)(implicit constantsBuffer: ConstantsBuffer, config: ToDAConfig): TypeAnnotationPath

    Permalink
  38. def toDA(typeAnnotationPathElement: TypeAnnotationPathElement)(implicit constantsBuffer: ConstantsBuffer, config: ToDAConfig): TypeAnnotationPathElement

    Permalink
  39. def toDA(typeAnnotationTarget: TypeAnnotationTarget)(implicit constantsBuffer: ConstantsBuffer, config: ToDAConfig): TypeAnnotationTarget

    Permalink
  40. def toDA(localvarTableEntry: LocalvarTableEntry)(implicit constantsBuffer: ConstantsBuffer, config: ToDAConfig): LocalvarTableEntry

    Permalink
  41. def toDA(annotation: Annotation)(implicit constantsBuffer: ConstantsBuffer, config: ToDAConfig): Annotation

    Permalink
  42. def toDA(elementValue: ElementValue)(implicit constantsBuffer: ConstantsBuffer, config: ToDAConfig): ElementValue

    Permalink
  43. def toDA(exceptionHandler: ExceptionHandler)(implicit constantsBuffer: ConstantsBuffer, config: ToDAConfig): ExceptionTableEntry

    Permalink
  44. def toDA(code: Code)(implicit constantsBuffer: ConstantsBuffer, config: ToDAConfig): Code_attribute

    Permalink
  45. def toDA(method: Method)(implicit constantsBuffer: ConstantsBuffer, config: ToDAConfig): Method_Info

    Permalink
  46. def toDA(field: Field)(implicit constantsBuffer: ConstantsBuffer, config: ToDAConfig): Field_Info

    Permalink
  47. def toDA(classFile: ClassFile)(implicit toDAConfig: ToDAConfig = ToDAConfig.RetainAllAttributes): ClassFile

    Permalink

    Converts a org.opalj.br.ClassFile to a org.opalj.da.ClassFile and all its attributes to the attributes in org.opalj.da.

Inherited from AnyRef

Inherited from Any

Ungrouped