public class SignatureParser extends Object
| Constructor and Description |
|---|
SignatureParser(String signature)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getArguments() |
int |
getNumParameters()
Get the number of parameters in the signature.
|
static int |
getNumParametersForInvocation(org.apache.bcel.generic.InvokeInstruction inv,
org.apache.bcel.generic.ConstantPoolGen cpg)
Get the number of parameters passed to method invocation.
|
static int |
getNumSlotsForType(String sig)
Return how many stack frame slots a type whose signature is given will
occupy. long and double values take 2 slots, while all other kinds of
values take 1 slot.
|
String |
getParameter(int pos) |
String |
getReturnTypeSignature()
Get the method return type signature.
|
int |
getSlotsFromTopOfStackForParameter(int paramNum) |
int |
getTotalArgumentSize() |
boolean |
hasReferenceParameters() |
static boolean |
isReferenceType(String signature)
Determine whether or not given signature denotes a reference type.
|
static void |
main(String[] args) |
Iterator<String> |
parameterSignatureIterator()
Get an Iterator over signatures of the method parameters.
|
Iterable<String> |
parameterSignatures() |
String |
toString() |
public SignatureParser(String signature)
signature - the method signature to be parsedpublic int getTotalArgumentSize()
public int getSlotsFromTopOfStackForParameter(int paramNum)
public String[] getArguments()
public Iterator<String> parameterSignatureIterator()
public String getReturnTypeSignature()
public int getNumParameters()
public boolean hasReferenceParameters()
public String getParameter(int pos)
public static boolean isReferenceType(String signature)
signature - a signaturepublic static int getNumParametersForInvocation(org.apache.bcel.generic.InvokeInstruction inv,
org.apache.bcel.generic.ConstantPoolGen cpg)
inv - cpg - public static int getNumSlotsForType(String sig)
sig - a type signaturepublic static void main(String[] args)
Copyright © 2003–2015. All rights reserved.