Package javassist.bytecode

# Class MethodParametersAttribute

java.lang.Object
javassist.bytecode.AttributeInfo
javassist.bytecode.MethodParametersAttribute

public class MethodParametersAttribute extends AttributeInfo
`MethodParameters_attribute`.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`tag`
The name of this attribute `"MethodParameters"`.

## Constructor Summary

Constructors
Constructor
Description
`MethodParametersAttribute(ConstPool cp, String[] names, int[] flags)`
Constructs an attribute.

## Method Summary

Modifier and Type
Method
Description
`int`
`accessFlags(int i)`
Returns the value of `access_flags` of the i-th element of `parameters`.
`AttributeInfo`
`copy(ConstPool newCp, Map<String,String> classnames)`
Makes a copy.
`int`
`name(int i)`
Returns the value of `name_index` of the i-th element of `parameters`.
`int`
`size()`
Returns `parameters_count`, which is the number of parameters.

### Methods inherited from class javassist.bytecode.AttributeInfo

`get, getConstPool, getName, length, set`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### tag

public static final String tag
The name of this attribute `"MethodParameters"`.

See Also:
  - Constant Field Values

## Constructor Details

### MethodParametersAttribute

public MethodParametersAttribute(ConstPool cp, 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 Details

### 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.

### 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, Map<String,String> classnames)
Makes a copy.

Overrides:
  `copy` in class `AttributeInfo`
Parameters:
  `newCp` - the constant pool table used by the new copy.
  `classnames` - ignored.