/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* WARNING: The contents of this source file are not part of any
* supported API. Code that depends on them does so at its own risk:
* they are subject to change or removal without notice.
*/
public
/**
* Constructor
*/
}
}
}
if (implementation != null)
return implementation;
return this;
}
/**
* Check if the expression is equal to a value
*/
}
/**
* Assign a value to this identifier. [It must already be "bound"]
*/
}
// allow definite single assignment of blank finals
if (!local.isBlankFinal()) {
}
}
local.writecount++;
}
return vset;
}
/**
* Get the value of this identifier. [ It must already be "bound"]
*/
}
}
} else {
}
}
if (field.isBlankFinal()) {
}
}
}
return vset;
}
/**
* Bind to a field
*/
try {
return false;
}
}
return false;
}
// Check access permission
return false;
}
// Find out how to access this variable.
// get a "val$x" copy via the current object
}
} else {
MemberDefinition f = field;
if (f.reportDeprecated(env)) {
id, f.getClassDefinition());
}
// Maybe an inherited field hides an apparent variable.
if (c == null) c = f.getClassDefinition();
id, c.getClassDeclaration());
} else {
id, c.getClassDeclaration(),
}
}
}
// Rewrite as a FieldExpression.
// Access methods for private fields, if needed, will be added
// during subsequent processing of the FieldExpression. See
// method 'FieldExpression.checkCommon'. This division of labor
// is somewhat awkward, as most further processing of a
// FieldExpression during the checking phase is suppressed when
// the referenced field is pre-set as it is here.
if (f.isStatic()) {
f.getClassDeclaration().getType());
} else {
}
}
}
// Check forward reference
return false;
}
return true;
} catch (ClassNotFound e) {
} catch (AmbiguousMember e) {
e.field2.getClassDeclaration());
}
return false;
}
/**
* Check expression
*/
// An internally pre-set field, such as an argument copying
// an uplevel value. Do not re-check it.
return vset;
}
if (implementation != null)
}
return vset;
}
/**
* Check the expression if it appears on the LHS of an assignment
*/
return vset;
if (implementation != null)
return vset;
}
/**
* Check the expression if it appears on the LHS of an op= expression
*/
return vset;
if (implementation != null)
return vset;
}
/**
* Return an accessor if one is needed for assignments to this expression.
*/
if (implementation != null)
return null;
}
/**
* Return an updater if one is needed for assignments to this expression.
*/
if (implementation != null)
return null;
}
/**
* Check if the present name is part of a scoping prefix.
*/
try {
// if this is a local field, there's nothing more to do.
}
} catch (ClassNotFound ee) {
} catch (AmbiguousMember ee) {
}
// Can this be interpreted as a type?
// Is it a real type??
if (c != null) {
return vset;
}
// We hope it is a package prefix. Let the caller decide.
return vset;
}
/**
* Convert an identifier to a known type, or null.
*/
boolean pkgOK) {
return null;
}
try {
// Maybe an inherited class hides an apparent class.
if (c.isMember()) {
if (sc != c.getOuterClass()) {
}
}
}
}
return c;
} catch (ClassNotFound ee) {
}
}
return null;
}
/**
* Convert an identifier to a type.
* If one is not known, use the current package as a qualifier.
*/
if (c != null) {
return c.getType();
}
}
/**
* Convert an expresion to a type in a context where a qualified
* type name is expected, e.g., in the prefix of a qualified type
* name. We do not necessarily know where the package prefix ends,
* so we operate similarly to 'checkAmbiguousName'. This is the
* base case -- the first component of the qualified name.
*/
/*-------------------------------------------------------*
Type toQualifiedType(Environment env, Context ctx) {
// We do not look for non-type fields. Is this correct?
ClassDefinition c = toResolvedType(env, ctx, true);
// Is it a real type?
if (c != null) {
return c.getType();
}
// We hope it is a package prefix. Let the caller decide.
return Type.tPackage;
}
*-------------------------------------------------------*/
/**
* Check if constant: Will it inline away?
*/
public boolean isConstant() {
if (implementation != null)
return implementation.isConstant();
return field.isConstant();
}
return false;
}
/**
* Inline
*/
return null;
}
if (implementation != null)
return this;
}
try {
}
return this;
}
return this;
} catch (ClassNotFound e) {
throw new CompilerError(e);
}
}
if (implementation != null)
return this;
}
if (implementation != null)
}
return e;
}
if (implementation != null)
}
/**
* Code local vars (object fields have been inlined away)
*/
return 0;
}
}
}
}
/**
* Print
*/
if (implementation != null) {
}
}
}