}
program.jsniMap.put(ident, node);
}
assert (node != null);
CanBeStatic canBeStatic = (CanBeStatic) node;
HasName hasName = (HasName) node;
boolean isField = node instanceof JField;
assert (isField || node instanceof JMethod);
if (canBeStatic.isStatic() && nameRef.getQualifier() != null) {
reportJsniError(info, x,
"Cannot make a qualified reference to the static "
+ (isField ? "field " : "method ") + hasName.getName());
} else if (!canBeStatic.isStatic() && nameRef.getQualifier() == null) {
reportJsniError(info, x,
"Cannot make an unqualified reference to the instance "
+ (isField ? "field " : "method ") + hasName.getName());
}
if (isField) {
/*
* TODO FIXME HACK: We should be replacing compile-time constant refs