Package org.apache.bcel.classfile
Class MethodParameter
java.lang.Object
org.apache.bcel.classfile.MethodParameter
Entry of the parameters table.
Implements Node as of 6.7.0.
- Since:
- 6.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe access flagsprivate intIndex of the CONSTANT_Utf8_info structure in the constant_pool table representing the name of the parameter -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a MethodParameter.MethodParameter(DataInput input) Constructs an instance from a DataInput. -
Method Summary
Modifier and TypeMethodDescriptionvoidAccepts a visitor.copy()Creates a deep copy of this object.final voiddump(DataOutputStream file) Dumps object to file stream on binary format.intGets the access flags.intGets the name index.getParameterName(ConstantPool constantPool) Gets the name of the parameter.booleanisFinal()Checks if this parameter is final.booleanChecks if this parameter is mandated.booleanChecks if this parameter is synthetic.voidsetAccessFlags(int accessFlags) Sets the access flags.voidsetNameIndex(int nameIndex) Sets the name index.
-
Field Details
-
nameIndex
private int nameIndexIndex of the CONSTANT_Utf8_info structure in the constant_pool table representing the name of the parameter -
accessFlags
private int accessFlagsThe access flags
-
-
Constructor Details
-
MethodParameter
public MethodParameter()Constructs a MethodParameter. -
MethodParameter
MethodParameter(DataInput input) throws IOException Constructs an instance from a DataInput.- Parameters:
input- Input stream.- Throws:
IOException- Thrown if an I/O error occurs.ClassFormatException- Thrown if a class is malformed or cannot be interpreted as a class file
-
-
Method Details
-
accept
Description copied from interface:NodeAccepts a visitor. -
copy
Creates a deep copy of this object.- Returns:
- deep copy of this object.
-
dump
Dumps object to file stream on binary format.- Parameters:
file- Output file stream.- Throws:
IOException- Thrown if an I/O error occurs.
-
getAccessFlags
public int getAccessFlags()Gets the access flags.- Returns:
- The access flags.
-
getNameIndex
public int getNameIndex()Gets the name index.- Returns:
- The name index.
-
getParameterName
Gets the name of the parameter.- Parameters:
constantPool- The pool to query.- Returns:
- Constant from the given pool.
-
isFinal
public boolean isFinal()Checks if this parameter is final.- Returns:
- true if this parameter is final.
-
isMandated
public boolean isMandated()Checks if this parameter is mandated.- Returns:
- true if this parameter is mandated.
-
isSynthetic
public boolean isSynthetic()Checks if this parameter is synthetic.- Returns:
- true if this parameter is synthetic.
-
setAccessFlags
public void setAccessFlags(int accessFlags) Sets the access flags.- Parameters:
accessFlags- The access flags.
-
setNameIndex
public void setNameIndex(int nameIndex) Sets the name index.- Parameters:
nameIndex- The name index.
-