JParameter parameter = (JParameter) variable;
if (parameter.getEnclosingMethod() != currentMethod) {
throw new InternalCompilerException(
"ParameterRef referencing param in a different method.");
}
return new JParameterRef(program, info, parameter);
} else if (variable instanceof JField) {
JField field = (JField) variable;
JExpression instance = null;
if (!field.isStatic()) {
JClassType fieldEnclosingType = (JClassType) field.getEnclosingType();