Class ASMifier


  • public class ASMifier
    extends Printer
    A Printer that prints the ASM code to generate the classes it visits.
    • Field Detail

      • USAGE

        private static final java.lang.String USAGE
        The help message shown when command line arguments are incorrect.
        See Also:
        Constant Field Values
      • ACCESS_CLASS

        private static final int ACCESS_CLASS
        A pseudo access flag used to distinguish class access flags.
        See Also:
        Constant Field Values
      • ACCESS_FIELD

        private static final int ACCESS_FIELD
        A pseudo access flag used to distinguish field access flags.
        See Also:
        Constant Field Values
      • ACCESS_INNER

        private static final int ACCESS_INNER
        A pseudo access flag used to distinguish inner class flags.
        See Also:
        Constant Field Values
      • ACCESS_MODULE

        private static final int ACCESS_MODULE
        A pseudo access flag used to distinguish module requires / exports flags.
        See Also:
        Constant Field Values
      • ANNOTATION_VISITOR

        private static final java.lang.String ANNOTATION_VISITOR
        See Also:
        Constant Field Values
      • ANNOTATION_VISITOR0

        private static final java.lang.String ANNOTATION_VISITOR0
        See Also:
        Constant Field Values
      • NEW_OBJECT_ARRAY

        private static final java.lang.String NEW_OBJECT_ARRAY
        See Also:
        Constant Field Values
      • FRAME_TYPES

        private static final java.util.List<java.lang.String> FRAME_TYPES
      • CLASS_VERSIONS

        private static final java.util.Map<java.lang.Integer,​java.lang.String> CLASS_VERSIONS
      • name

        protected final java.lang.String name
        The name of the visitor variable in the produced code.
      • id

        protected final int id
        The identifier of the annotation visitor variable in the produced code.
      • labelNames

        protected java.util.Map<Label,​java.lang.String> labelNames
        The name of the Label variables in the produced code.
    • Constructor Detail

      • ASMifier

        public ASMifier()
        Constructs a new ASMifier. Subclasses must not use this constructor. Instead, they must use the ASMifier(int, String, int) version.
        Throws:
        java.lang.IllegalStateException - If a subclass calls this constructor.
      • ASMifier

        protected ASMifier​(int api,
                           java.lang.String visitorVariableName,
                           int annotationVisitorId)
        Constructs a new ASMifier.
        Parameters:
        api - the ASM API version implemented by this class. Must be one of the ASMx values in Opcodes.
        visitorVariableName - the name of the visitor variable in the produced code.
        annotationVisitorId - identifier of the annotation visitor variable in the produced code.