Class MethodParametersAttribute


  • public class MethodParametersAttribute
    extends AttributeInfo
    MethodParameters_attribute.
    • Field Detail

      • tag

        public static final java.lang.String tag
        The name of this attribute "MethodParameters".
        See Also:
        Constant Field Values
    • Constructor Detail

      • MethodParametersAttribute

        MethodParametersAttribute​(ConstPool cp,
                                  int n,
                                  java.io.DataInputStream in)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • MethodParametersAttribute

        public MethodParametersAttribute​(ConstPool cp,
                                         java.lang.String[] names,
                                         int[] flags)
        Constructs an attribute.
        Parameters:
        cp - a constant pool table.
        names - an array of parameter names. The i-th element is the name of the i-th parameter.
        flags - an array of parameter access flags.
    • Method Detail

      • size

        public int size()
        Returns parameters_count, which is the number of parameters.
      • name

        public int name​(int i)
        Returns the value of name_index of the i-th element of parameters.
        Parameters:
        i - the position of the parameter.
      • parameterName

        public java.lang.String parameterName​(int i)
        Returns the name of the i-th element of parameters.
        Parameters:
        i - the position of the parameter.
      • accessFlags

        public int accessFlags​(int i)
        Returns the value of access_flags of the i-th element of parameters.
        Parameters:
        i - the position of the parameter.
        See Also:
        AccessFlag
      • copy

        public AttributeInfo copy​(ConstPool newCp,
                                  java.util.Map<java.lang.String,​java.lang.String> classnames)
        Makes a copy.
        Overrides:
        copy in class AttributeInfo
        Parameters:
        newCp - the constant pool table used by the new copy.
        classnames - ignored.