Methods Summary |
---|
private org.apache.axis.utils.bytecode.ParamReader$MethodInfo | getMethodInfo()
MethodInfo info = null;
if (methods != null && methodName != null)
{
info = (MethodInfo) methods.get(methodName);
}
return info;
|
public java.lang.String[] | getParameterNames(java.lang.reflect.Constructor ctor)return the names of the declared parameters for the given constructor.
If we cannot determine the names, return null. The returned array will
have one name per parameter. The length of the array will be the same
as the length of the Class[] array returned by Constructor.getParameterTypes().
paramTypes = ctor.getParameterTypes();
return getParameterNames(ctor, paramTypes);
|
public java.lang.String[] | getParameterNames(java.lang.reflect.Method method)return the names of the declared parameters for the given method.
If we cannot determine the names, return null. The returned array will
have one name per parameter. The length of the array will be the same
as the length of the Class[] array returned by Method.getParameterTypes().
paramTypes = method.getParameterTypes();
return getParameterNames(method, paramTypes);
|
protected java.lang.String[] | getParameterNames(java.lang.reflect.Member member, java.lang.Class[] paramTypes)
// look up the names for this method
MethodInfo info = (MethodInfo) methods.get(getSignature(member, paramTypes));
// we know all the local variable names, but we only need to return
// the names of the parameters.
if (info != null) {
String[] paramNames = new String[paramTypes.length];
int j = Modifier.isStatic(member.getModifiers()) ? 0 : 1;
boolean found = false; // did we find any non-null names
for (int i = 0; i < paramNames.length; i++) {
if (info.names[j] != null) {
found = true;
paramNames[i] = info.names[j];
}
j++;
if (paramTypes[i] == double.class || paramTypes[i] == long.class) {
// skip a slot for 64bit params
j++;
}
}
if (found) {
return paramNames;
} else {
return null;
}
} else {
return null;
}
|
public void | readCode()
readShort(); // max stack
int maxLocals = readShort(); // max locals
MethodInfo info = new MethodInfo(maxLocals);
if (methods != null && methodName != null)
{
methods.put(methodName, info);
}
skipFully(readInt()); // code
skipFully(8 * readShort()); // exception table
// read the code attributes (recursive). This is where
// we will find the LocalVariableTable attribute.
readAttributes();
|
public void | readLocalVariableTable()this is invoked when a LocalVariableTable attribute is encountered.
int len = readShort(); // table length
MethodInfo info = getMethodInfo();
for (int j = 0; j < len; j++) {
readShort(); // start pc
readShort(); // length
int nameIndex = readShort(); // name_index
readShort(); // descriptor_index
int index = readShort(); // local index
if (info != null) {
info.names[index] = resolveUtf8(nameIndex);
}
}
|