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