All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.extendj.ast.Dot Maven / Gradle / Ivy

The newest version!
/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.0 */
package org.extendj.ast;
import java.util.ArrayList;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.IOException;
import java.util.Set;
import beaver.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.LinkedHashSet;
import java.util.*;
import org.jastadd.util.PrettyPrintable;
import org.jastadd.util.PrettyPrinter;
import java.util.zip.*;
import java.io.*;
import org.jastadd.util.*;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
/**
 * A qualified expression.
 * The left hand side qualifies the right hand side.
 * 
 * 

Note: this type can represent more than a simple "dot" * expression. There can be an array access as the right hand side, * e.g., {@code left[3] }. * @ast node * @declaredat /home/jesper/git/extendj/java4/grammar/Java.ast:79 * @astdecl Dot : Access ::= Left:Expr Right:Access; * @production Dot : {@link Access} ::= Left:{@link Expr} Right:{@link Access}; */ public class Dot extends Access implements Cloneable { /** * @aspect Java4PrettyPrint * @declaredat /home/jesper/git/extendj/java4/frontend/PrettyPrint.jadd:337 */ public void prettyPrint(PrettyPrinter out) { if (needsDot()) { out.print(getLeft()); out.print("."); out.print(getRight()); } else { out.print(getLeft()); out.print(getRight()); } } /** * @aspect QualifiedNames * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:190 */ public Dot lastDot() { Dot node = this; while (node.getRightNoTransform() instanceof Dot) { node = (Dot) node.getRightNoTransform(); } return node; } /** * @aspect QualifiedNames * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:208 */ public Access qualifiesAccess(Access access) { Dot lastDot = lastDot(); Expr last = lastDot.getRightNoTransform(); Access qualified = last.qualifiesAccess(access); qualified.setEnd(access.getEnd()); lastDot.setRight(qualified); return this; } /** * Used when replacing pairs from a list to concatenate the result to the * tail of the current location. * @aspect QualifiedNames * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:235 */ private Access qualifyTailWith(Access expr) { if (getRight() instanceof Dot) { Dot dot = (Dot) getRight(); return expr.qualifiesAccess(dot.getRight().treeCopyNoTransform()); } return expr; } /** * @aspect PrettyPrintUtil * @declaredat /home/jesper/git/extendj/java4/frontend/PrettyPrintUtil.jrag:143 */ @Override public String toString() { Expr left = getLeftNoTransform(); Expr right = getRightNoTransform(); if (!(right instanceof ArrayAccess)) { return String.format("%s.%s", left.toString(), right.toString()); } else { ArrayAccess array = (ArrayAccess) right; return String.format("%s[%s]", left.toString(), array.getExprNoTransform().toString()); } } /** * @aspect CreateBCode * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:464 */ public void createAssignSimpleLoadDest(CodeGeneration gen) { lastAccess().createAssignSimpleLoadDest(gen); } /** * @aspect CreateBCode * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:483 */ public void createPushAssignmentResult(CodeGeneration gen) { lastAccess().createPushAssignmentResult(gen); } /** * @aspect CreateBCode * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:506 */ public void createAssignLoadDest(CodeGeneration gen) { lastAccess().createAssignLoadDest(gen); } /** * @aspect CreateBCode * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:561 */ public void createBCode(CodeGeneration gen) { if (transformed() != this) { transformed().createBCode(gen); } else { getRight().createBCode(gen); } } /** * @aspect CreateBCode * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1254 */ public void branchTrue(CodeGeneration gen, int target) { // Branch when true. lastAccess().branchTrue(gen, target); } /** * @aspect CreateBCode * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1365 */ public void branchFalse(CodeGeneration gen, int target) { // Branch when false. lastAccess().branchFalse(gen, target); } /** * @aspect CodeGeneration * @declaredat /home/jesper/git/extendj/java4/backend/CodeGeneration.jrag:227 */ public void emitStore(CodeGeneration gen) { lastAccess().emitStore(gen); } /** * @declaredat ASTNode:1 */ public Dot() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @declaredat ASTNode:10 */ public void init$Children() { children = new ASTNode[2]; } /** * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( name = {"Left", "Right"}, type = {"Expr", "Access"}, kind = {"Child", "Child"} ) public Dot(Expr p0, Access p1) { setChild(p0, 0); setChild(p1, 1); } /** @apilevel low-level * @declaredat ASTNode:23 */ protected int numChildren() { return 2; } /** * @apilevel internal * @declaredat ASTNode:29 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal * @declaredat ASTNode:33 */ public void flushAttrCache() { super.flushAttrCache(); type_reset(); unassignedAfterTrue_Variable_reset(); unassignedAfterFalse_Variable_reset(); unassignedAfter_Variable_reset(); transformed_reset(); transformedSuperAccessor_reset(); } /** @apilevel internal * @declaredat ASTNode:43 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal * @declaredat ASTNode:47 */ public Dot clone() throws CloneNotSupportedException { Dot node = (Dot) super.clone(); return node; } /** @apilevel internal * @declaredat ASTNode:52 */ public Dot copy() { try { Dot node = (Dot) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); } return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead * @declaredat ASTNode:71 */ @Deprecated public Dot fullCopy() { return treeCopyNoTransform(); } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level * @declaredat ASTNode:81 */ public Dot treeCopyNoTransform() { Dot tree = (Dot) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if (child != null) { child = child.treeCopyNoTransform(); tree.setChild(child, i); } } } return tree; } /** * Create a deep copy of the AST subtree at this node. * The subtree of this node is traversed to trigger rewrites before copy. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level * @declaredat ASTNode:101 */ public Dot treeCopy() { Dot tree = (Dot) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); if (child != null) { child = child.treeCopy(); tree.setChild(child, i); } } } return tree; } /** @apilevel internal * @declaredat ASTNode:115 */ protected boolean is$Equal(ASTNode node) { return super.is$Equal(node); } /** * Replaces the Left child. * @param node The new node to replace the Left child. * @apilevel high-level */ public void setLeft(Expr node) { setChild(node, 0); } /** * Retrieves the Left child. * @return The current node used as the Left child. * @apilevel high-level */ @ASTNodeAnnotation.Child(name="Left") public Expr getLeft() { return (Expr) getChild(0); } /** * Retrieves the Left child. *

This method does not invoke AST transformations.

* @return The current node used as the Left child. * @apilevel low-level */ public Expr getLeftNoTransform() { return (Expr) getChildNoTransform(0); } /** * Replaces the Right child. * @param node The new node to replace the Right child. * @apilevel high-level */ public void setRight(Access node) { setChild(node, 1); } /** * Retrieves the Right child. * @return The current node used as the Right child. * @apilevel high-level */ @ASTNodeAnnotation.Child(name="Right") public Access getRight() { return (Access) getChild(1); } /** * Retrieves the Right child. *

This method does not invoke AST transformations.

* @return The current node used as the Right child. * @apilevel low-level */ public Access getRightNoTransform() { return (Access) getChildNoTransform(1); } /** * Defines the expected kind of name for the left hand side in a qualified * expression. * @attribute syn * @aspect SyntacticClassification * @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:60 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="SyntacticClassification", declaredAt="/home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:60") public NameType predNameType() { NameType predNameType_value = getLeft() instanceof Access ? ((Access) getLeft()).predNameType() : NameType.NOT_CLASSIFIED; return predNameType_value; } /** * @attribute syn * @aspect ConstantExpression * @declaredat /home/jesper/git/extendj/java4/frontend/ConstantExpression.jrag:32 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="ConstantExpression", declaredAt="/home/jesper/git/extendj/java4/frontend/ConstantExpression.jrag:32") public Constant constant() { Constant constant_value = lastAccess().constant(); return constant_value; } /** * @attribute syn * @aspect ConstantExpression * @declaredat /home/jesper/git/extendj/java4/frontend/ConstantExpression.jrag:383 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="ConstantExpression", declaredAt="/home/jesper/git/extendj/java4/frontend/ConstantExpression.jrag:383") public boolean isConstant() { boolean isConstant_value = lastAccess().isConstant(); return isConstant_value; } /** * @attribute syn * @aspect Names * @declaredat /home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:73 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="Names", declaredAt="/home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:73") public String typeName() { String typeName_value = lastAccess().typeName(); return typeName_value; } /** * @attribute syn * @aspect AccessTypes * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:35 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="AccessTypes", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:35") public boolean isTypeAccess() { boolean isTypeAccess_value = getRight().isTypeAccess(); return isTypeAccess_value; } /** * @attribute syn * @aspect AccessTypes * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:47 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="AccessTypes", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:47") public boolean isMethodAccess() { boolean isMethodAccess_value = getRight().isMethodAccess(); return isMethodAccess_value; } /** * @attribute syn * @aspect AccessTypes * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:51 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="AccessTypes", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:51") public boolean isFieldAccess() { boolean isFieldAccess_value = getRight().isFieldAccess(); return isFieldAccess_value; } /** * @attribute syn * @aspect AccessTypes * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:56 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="AccessTypes", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:56") public boolean isSuperAccess() { boolean isSuperAccess_value = getRight().isSuperAccess(); return isSuperAccess_value; } /** * @attribute syn * @aspect AccessTypes * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:62 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="AccessTypes", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:62") public boolean isThisAccess() { boolean isThisAccess_value = getRight().isThisAccess(); return isThisAccess_value; } /** * @attribute syn * @aspect AccessTypes * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:68 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="AccessTypes", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:68") public boolean isPackageAccess() { boolean isPackageAccess_value = getRight().isPackageAccess(); return isPackageAccess_value; } /** * @attribute syn * @aspect AccessTypes * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:72 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="AccessTypes", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:72") public boolean isArrayAccess() { boolean isArrayAccess_value = getRight().isArrayAccess(); return isArrayAccess_value; } /** * @attribute syn * @aspect AccessTypes * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:76 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="AccessTypes", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:76") public boolean isClassAccess() { boolean isClassAccess_value = getRight().isClassAccess(); return isClassAccess_value; } /** * @attribute syn * @aspect AccessTypes * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:80 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="AccessTypes", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:80") public boolean isSuperConstructorAccess() { boolean isSuperConstructorAccess_value = getRight().isSuperConstructorAccess(); return isSuperConstructorAccess_value; } /** * @attribute syn * @aspect QualifiedNames * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:164 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="QualifiedNames", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:164") public boolean isQualified() { boolean isQualified_value = hasParentDot(); return isQualified_value; } /** * @attribute syn * @aspect QualifiedNames * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:169 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="QualifiedNames", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:169") public Expr leftSide() { Expr leftSide_value = getLeft(); return leftSide_value; } /** * @attribute syn * @aspect QualifiedNames * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:171 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="QualifiedNames", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:171") public Access rightSide() { Access rightSide_value = getRight() instanceof Dot ? (Access)((Dot) getRight()).getLeft() : (Access) getRight(); return rightSide_value; } /** * @attribute syn * @aspect QualifiedNames * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:174 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="QualifiedNames", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:174") public Access lastAccess() { Access lastAccess_value = getRight().lastAccess(); return lastAccess_value; } /** * Pretty-printed qualified expression needs a dot unless the right * hand side is an array access. * @attribute syn * @aspect PrettyPrintUtil * @declaredat /home/jesper/git/extendj/java4/frontend/PrettyPrintUtil.jrag:350 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="PrettyPrintUtil", declaredAt="/home/jesper/git/extendj/java4/frontend/PrettyPrintUtil.jrag:350") public boolean needsDot() { boolean needsDot_value = !(rightSide() instanceof ArrayAccess); return needsDot_value; } /** @apilevel internal */ private void type_reset() { type_computed = null; type_value = null; } /** @apilevel internal */ protected ASTState.Cycle type_computed = null; /** @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:295 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="TypeAnalysis", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:295") public TypeDecl type() { ASTState state = state(); if (type_computed == ASTState.NON_CYCLE || type_computed == state().cycle()) { return type_value; } type_value = lastAccess().type(); if (state().inCircle()) { type_computed = state().cycle(); } else { type_computed = ASTState.NON_CYCLE; } return type_value; } /** * @attribute syn * @aspect TypeHierarchyCheck * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:240 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="TypeHierarchyCheck", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:240") public boolean staticContextQualifier() { boolean staticContextQualifier_value = lastAccess().staticContextQualifier(); return staticContextQualifier_value; } /** * @attribute syn * @aspect DefiniteAssignment * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:77 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="DefiniteAssignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:77") public Variable varDecl() { Variable varDecl_value = lastAccess().varDecl(); return varDecl_value; } /** * @attribute syn * @aspect DefiniteAssignment * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:375 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="DefiniteAssignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:375") public boolean assignedAfterTrue(Variable v) { boolean assignedAfterTrue_Variable_value = assignedAfter(v); return assignedAfterTrue_Variable_value; } /** * @attribute syn * @aspect DefiniteAssignment * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:377 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="DefiniteAssignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:377") public boolean assignedAfterFalse(Variable v) { boolean assignedAfterFalse_Variable_value = assignedAfter(v); return assignedAfterFalse_Variable_value; } /** * @attribute syn * @aspect DefiniteAssignment * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:268 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="DefiniteAssignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:268") public boolean assignedAfter(Variable v) { boolean assignedAfter_Variable_value = lastAccess().assignedAfter(v); return assignedAfter_Variable_value; } /** @apilevel internal */ private void unassignedAfterTrue_Variable_reset() { unassignedAfterTrue_Variable_values = null; } protected java.util.Map unassignedAfterTrue_Variable_values; @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isCircular=true) @ASTNodeAnnotation.Source(aspect="DefiniteUnassignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:905") public boolean unassignedAfterTrue(Variable v) { Object _parameters = v; if (unassignedAfterTrue_Variable_values == null) unassignedAfterTrue_Variable_values = new java.util.HashMap(4); ASTState.CircularValue _value; if (unassignedAfterTrue_Variable_values.containsKey(_parameters)) { Object _cache = unassignedAfterTrue_Variable_values.get(_parameters); if (!(_cache instanceof ASTState.CircularValue)) { return (Boolean) _cache; } else { _value = (ASTState.CircularValue) _cache; } } else { _value = new ASTState.CircularValue(); unassignedAfterTrue_Variable_values.put(_parameters, _value); _value.value = true; } ASTState state = state(); if (!state.inCircle() || state.calledByLazyAttribute()) { state.enterCircle(); boolean new_unassignedAfterTrue_Variable_value; do { _value.cycle = state.nextCycle(); new_unassignedAfterTrue_Variable_value = unassignedAfter(v); if (((Boolean)_value.value) != new_unassignedAfterTrue_Variable_value) { state.setChangeInCycle(); _value.value = new_unassignedAfterTrue_Variable_value; } } while (state.testAndClearChangeInCycle()); unassignedAfterTrue_Variable_values.put(_parameters, new_unassignedAfterTrue_Variable_value); state.leaveCircle(); return new_unassignedAfterTrue_Variable_value; } else if (_value.cycle != state.cycle()) { _value.cycle = state.cycle(); boolean new_unassignedAfterTrue_Variable_value = unassignedAfter(v); if (((Boolean)_value.value) != new_unassignedAfterTrue_Variable_value) { state.setChangeInCycle(); _value.value = new_unassignedAfterTrue_Variable_value; } return new_unassignedAfterTrue_Variable_value; } else { return (Boolean) _value.value; } } /** @apilevel internal */ private void unassignedAfterFalse_Variable_reset() { unassignedAfterFalse_Variable_values = null; } protected java.util.Map unassignedAfterFalse_Variable_values; @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isCircular=true) @ASTNodeAnnotation.Source(aspect="DefiniteUnassignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:907") public boolean unassignedAfterFalse(Variable v) { Object _parameters = v; if (unassignedAfterFalse_Variable_values == null) unassignedAfterFalse_Variable_values = new java.util.HashMap(4); ASTState.CircularValue _value; if (unassignedAfterFalse_Variable_values.containsKey(_parameters)) { Object _cache = unassignedAfterFalse_Variable_values.get(_parameters); if (!(_cache instanceof ASTState.CircularValue)) { return (Boolean) _cache; } else { _value = (ASTState.CircularValue) _cache; } } else { _value = new ASTState.CircularValue(); unassignedAfterFalse_Variable_values.put(_parameters, _value); _value.value = true; } ASTState state = state(); if (!state.inCircle() || state.calledByLazyAttribute()) { state.enterCircle(); boolean new_unassignedAfterFalse_Variable_value; do { _value.cycle = state.nextCycle(); new_unassignedAfterFalse_Variable_value = unassignedAfter(v); if (((Boolean)_value.value) != new_unassignedAfterFalse_Variable_value) { state.setChangeInCycle(); _value.value = new_unassignedAfterFalse_Variable_value; } } while (state.testAndClearChangeInCycle()); unassignedAfterFalse_Variable_values.put(_parameters, new_unassignedAfterFalse_Variable_value); state.leaveCircle(); return new_unassignedAfterFalse_Variable_value; } else if (_value.cycle != state.cycle()) { _value.cycle = state.cycle(); boolean new_unassignedAfterFalse_Variable_value = unassignedAfter(v); if (((Boolean)_value.value) != new_unassignedAfterFalse_Variable_value) { state.setChangeInCycle(); _value.value = new_unassignedAfterFalse_Variable_value; } return new_unassignedAfterFalse_Variable_value; } else { return (Boolean) _value.value; } } /** @apilevel internal */ private void unassignedAfter_Variable_reset() { unassignedAfter_Variable_values = null; } protected java.util.Map unassignedAfter_Variable_values; @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isCircular=true) @ASTNodeAnnotation.Source(aspect="DefiniteUnassignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:899") public boolean unassignedAfter(Variable v) { Object _parameters = v; if (unassignedAfter_Variable_values == null) unassignedAfter_Variable_values = new java.util.HashMap(4); ASTState.CircularValue _value; if (unassignedAfter_Variable_values.containsKey(_parameters)) { Object _cache = unassignedAfter_Variable_values.get(_parameters); if (!(_cache instanceof ASTState.CircularValue)) { return (Boolean) _cache; } else { _value = (ASTState.CircularValue) _cache; } } else { _value = new ASTState.CircularValue(); unassignedAfter_Variable_values.put(_parameters, _value); _value.value = true; } ASTState state = state(); if (!state.inCircle() || state.calledByLazyAttribute()) { state.enterCircle(); boolean new_unassignedAfter_Variable_value; do { _value.cycle = state.nextCycle(); new_unassignedAfter_Variable_value = lastAccess().unassignedAfter(v); if (((Boolean)_value.value) != new_unassignedAfter_Variable_value) { state.setChangeInCycle(); _value.value = new_unassignedAfter_Variable_value; } } while (state.testAndClearChangeInCycle()); unassignedAfter_Variable_values.put(_parameters, new_unassignedAfter_Variable_value); state.leaveCircle(); return new_unassignedAfter_Variable_value; } else if (_value.cycle != state.cycle()) { _value.cycle = state.cycle(); boolean new_unassignedAfter_Variable_value = lastAccess().unassignedAfter(v); if (((Boolean)_value.value) != new_unassignedAfter_Variable_value) { state.setChangeInCycle(); _value.value = new_unassignedAfter_Variable_value; } return new_unassignedAfter_Variable_value; } else { return (Boolean) _value.value; } } /** * @attribute syn * @aspect TypeCheck * @declaredat /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:33 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="TypeCheck", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:33") public boolean isVariable() { boolean isVariable_value = lastAccess().isVariable(); return isVariable_value; } /** * Creates a copy of this access where parameterized types have been erased. * @attribute syn * @aspect LookupParTypeDecl * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1612 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="LookupParTypeDecl", declaredAt="/home/jesper/git/extendj/java5/frontend/Generics.jrag:1612") public Access erasedCopy() { Access erasedCopy_value = new Dot(getLeft().erasedCopy(), getRight().erasedCopy()); return erasedCopy_value; } /** @apilevel internal */ private void transformed_reset() { transformed_computed = null; transformed_value = null; } /** @apilevel internal */ protected ASTState.Cycle transformed_computed = null; /** @apilevel internal */ protected Access transformed_value; /** * Normalized version of this qualified access. * @attribute syn * @aspect Transformations * @declaredat /home/jesper/git/extendj/java4/backend/Transformations.jrag:58 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="Transformations", declaredAt="/home/jesper/git/extendj/java4/backend/Transformations.jrag:58") public Access transformed() { ASTState state = state(); if (transformed_computed == ASTState.NON_CYCLE || transformed_computed == state().cycle()) { return transformed_value; } transformed_value = transformed_compute(); if (state().inCircle()) { transformed_computed = state().cycle(); } else { transformed_computed = ASTState.NON_CYCLE; } return transformed_value; } /** @apilevel internal */ private Access transformed_compute() { // Note: this attribute should return a Dot that can not be transformed further! if (requiresSuperAccessor()) { return transformedSuperAccessor(); } else { return this; } } /** @apilevel internal */ private void transformedSuperAccessor_reset() { transformedSuperAccessor_computed = false; transformedSuperAccessor_value = null; } /** @apilevel internal */ protected boolean transformedSuperAccessor_computed = false; /** @apilevel internal */ protected Access transformedSuperAccessor_value; /** * Builds a transformed version of this expression that calls * a generated super accessor method. * @attribute syn * @aspect Transformations * @declaredat /home/jesper/git/extendj/java4/backend/Transformations.jrag:71 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isNTA=true) @ASTNodeAnnotation.Source(aspect="Transformations", declaredAt="/home/jesper/git/extendj/java4/backend/Transformations.jrag:71") public Access transformedSuperAccessor() { ASTState state = state(); if (transformedSuperAccessor_computed) { return transformedSuperAccessor_value; } state().enterLazyAttribute(); transformedSuperAccessor_value = transformedSuperAccessor_compute(); transformedSuperAccessor_value.setParent(this); transformedSuperAccessor_computed = true; state().leaveLazyAttribute(); return transformedSuperAccessor_value; } /** @apilevel internal */ private Access transformedSuperAccessor_compute() { MethodAccess method = (MethodAccess) rightSide(); List args = new List(); if (isQualified()) { args.add(qualifier().treeCopyNoTransform().qualifiesAccess(new ThisAccess())); } else { args.add(new ThisAccess()); } for (Expr arg : method.getArgList()) { args.add(arg.treeCopyNoTransform()); } return ((SuperAccess) leftSide()).superAccessorTarget() .superAccessor(superAccessorTargetMethod()).createBoundAccess(args); } /** * @attribute syn * @aspect CreateBCode * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:300 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="CreateBCode", declaredAt="/home/jesper/git/extendj/java4/backend/CreateBCode.jrag:300") public boolean needsPop() { boolean needsPop_value = lastAccess().needsPop(); return needsPop_value; } /** * @attribute syn * @aspect CreateBCode * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:313 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="CreateBCode", declaredAt="/home/jesper/git/extendj/java4/backend/CreateBCode.jrag:313") public boolean isVarAccessWithAccessor() { boolean isVarAccessWithAccessor_value = lastAccess().isVarAccessWithAccessor(); return isVarAccessWithAccessor_value; } /** * @attribute syn * @aspect CreateBCode * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1150 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="CreateBCode", declaredAt="/home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1150") public boolean canBeTrue() { boolean canBeTrue_value = lastAccess().canBeTrue(); return canBeTrue_value; } /** * @attribute syn * @aspect CreateBCode * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1162 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="CreateBCode", declaredAt="/home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1162") public boolean canBeFalse() { boolean canBeFalse_value = lastAccess().canBeFalse(); return canBeFalse_value; } /** @return {@code true} if this is a method call that requires a super accessor. * @attribute syn * @aspect GenerateClassfile * @declaredat /home/jesper/git/extendj/java4/backend/GenerateClassfile.jrag:408 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="GenerateClassfile", declaredAt="/home/jesper/git/extendj/java4/backend/GenerateClassfile.jrag:408") public boolean requiresSuperAccessor() { boolean requiresSuperAccessor_value = leftSide().isSuperAccess() && rightSide().isInstanceMethodAccess() && !hostType().instanceOf(leftSide().type()); return requiresSuperAccessor_value; } /** * @attribute syn * @aspect GenerateClassfile * @declaredat /home/jesper/git/extendj/java4/backend/GenerateClassfile.jrag:413 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="GenerateClassfile", declaredAt="/home/jesper/git/extendj/java4/backend/GenerateClassfile.jrag:413") public MethodDecl superAccessorTargetMethod() { MethodDecl superAccessorTargetMethod_value = ((MethodAccess) rightSide()).decl().erasedMethod(); return superAccessorTargetMethod_value; } /** * This finds the erased runtime type of this expression. * *

The erased type of a field or method depends on the original * declaration of the field or method (without generic type substitution). * *

The erased type is used to determine when a checkcast conversion is * needed to cast a generic type to the expected type. * @attribute syn * @aspect GenericsCodegen * @declaredat /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:147 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="GenericsCodegen", declaredAt="/home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:147") public TypeDecl erasedType() { TypeDecl erasedType_value = getRight().erasedType(); return erasedType_value; } /** * Finds the host type declaration of a class access. * *

Call this attribute only on expressions that return {@code true} for * isClassAccess or it may throw an error! * * @return the TypeDecl corresponding to the accesssed class. * @attribute syn * @aspect AnnotationsCodegen * @declaredat /home/jesper/git/extendj/java5/backend/AnnotationsCodegen.jrag:278 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="AnnotationsCodegen", declaredAt="/home/jesper/git/extendj/java5/backend/AnnotationsCodegen.jrag:278") public TypeDecl classAccess() { { if (getRight() instanceof ClassAccess) { return getLeft().classAccess(); } else { return getRight().classAccess(); } } } /** * @attribute inh * @aspect NameResolution * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:541 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.INH) @ASTNodeAnnotation.Source(aspect="NameResolution", declaredAt="/home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:541") public boolean canResolve() { boolean canResolve_value = getParent().Define_canResolve(this, null); return canResolve_value; } /** * @attribute inh * @aspect DefiniteUnassignment * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:903 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.INH) @ASTNodeAnnotation.Source(aspect="DefiniteUnassignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:903") public boolean unassignedBefore(Variable v) { boolean unassignedBefore_Variable_value = getParent().Define_unassignedBefore(this, null, v); return unassignedBefore_Variable_value; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:36 * @apilevel internal */ public NameType Define_nameType(ASTNode _callerNode, ASTNode _childNode) { if (getLeftNoTransform() != null && _callerNode == getLeft()) { // @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:81 return getRightNoTransform().predNameType(); } else { return getParent().Define_nameType(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:36 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute nameType */ protected boolean canDefine_nameType(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:86 * @apilevel internal */ public boolean Define_isLeftChildOfDot(ASTNode _callerNode, ASTNode _childNode) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:90 return false; } else if (getLeftNoTransform() != null && _callerNode == getLeft()) { // @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:89 return true; } else { return super.Define_isLeftChildOfDot(_callerNode, _childNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:86 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute isLeftChildOfDot */ protected boolean canDefine_isLeftChildOfDot(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:101 * @apilevel internal */ public boolean Define_isRightChildOfDot(ASTNode _callerNode, ASTNode _childNode) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:105 return true; } else if (getLeftNoTransform() != null && _callerNode == getLeft()) { // @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:104 return isRightChildOfDot(); } else { return super.Define_isRightChildOfDot(_callerNode, _childNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:101 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute isRightChildOfDot */ protected boolean canDefine_isRightChildOfDot(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:118 * @apilevel internal */ public Expr Define_prevExpr(ASTNode _callerNode, ASTNode _childNode) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:121 return getLeft(); } else if (getLeftNoTransform() != null && _callerNode == getLeft()) { // @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:120 return prevExpr(); } else { return super.Define_prevExpr(_callerNode, _childNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:118 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute prevExpr */ protected boolean canDefine_prevExpr(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:142 * @apilevel internal */ public Access Define_nextAccess(ASTNode _callerNode, ASTNode _childNode) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:145 return nextAccessError(); } else if (getLeftNoTransform() != null && _callerNode == getLeft()) { // @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:144 return getRight(); } else { return super.Define_nextAccess(_callerNode, _childNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:142 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute nextAccess */ protected boolean canDefine_nextAccess(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:540 * @apilevel internal */ public boolean Define_canResolve(ASTNode _callerNode, ASTNode _childNode) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:550 return !getLeft().containsParseName() && canResolve(); } else { return getParent().Define_canResolve(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:540 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute canResolve */ protected boolean canDefine_canResolve(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/LookupConstructor.jrag:35 * @apilevel internal */ public Collection Define_lookupConstructor(ASTNode _callerNode, ASTNode _childNode) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/LookupConstructor.jrag:41 return getLeft().type().constructors(); } else { return getParent().Define_lookupConstructor(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/LookupConstructor.jrag:35 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute lookupConstructor */ protected boolean canDefine_lookupConstructor(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/LookupConstructor.jrag:43 * @apilevel internal */ public Collection Define_lookupSuperConstructor(ASTNode _callerNode, ASTNode _childNode) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/LookupConstructor.jrag:56 return getLeft().type().lookupSuperConstructor(); } else { return getParent().Define_lookupSuperConstructor(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/LookupConstructor.jrag:43 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute lookupSuperConstructor */ protected boolean canDefine_lookupSuperConstructor(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:113 * @apilevel internal */ public boolean Define_hasPackage(ASTNode _callerNode, ASTNode _childNode, String packageName) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:108 return getLeft().hasQualifiedPackage(packageName); } else { return getParent().Define_hasPackage(this, _callerNode, packageName); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:113 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute hasPackage */ protected boolean canDefine_hasPackage(ASTNode _callerNode, ASTNode _childNode, String packageName) { return true; } /** * @declaredat /home/jesper/git/extendj/java5/frontend/GenericMethods.jrag:231 * @apilevel internal */ public SimpleSet Define_lookupType(ASTNode _callerNode, ASTNode _childNode, String name) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:610 return getLeft().qualifiedLookupType(name); } else { return getParent().Define_lookupType(this, _callerNode, name); } } /** * @declaredat /home/jesper/git/extendj/java5/frontend/GenericMethods.jrag:231 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute lookupType */ protected boolean canDefine_lookupType(ASTNode _callerNode, ASTNode _childNode, String name) { return true; } /** * @declaredat /home/jesper/git/extendj/java5/frontend/EnhancedFor.jrag:138 * @apilevel internal */ public SimpleSet Define_lookupVariable(ASTNode _callerNode, ASTNode _childNode, String name) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/LookupVariable.jrag:257 return getLeft().qualifiedLookupVariable(name); } else { return getParent().Define_lookupVariable(this, _callerNode, name); } } /** * @declaredat /home/jesper/git/extendj/java5/frontend/EnhancedFor.jrag:138 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute lookupVariable */ protected boolean canDefine_lookupVariable(ASTNode _callerNode, ASTNode _childNode, String name) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:33 * @apilevel internal */ public String Define_methodHost(ASTNode _callerNode, ASTNode _childNode) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:37 return getLeft().type().typeName(); } else { return getParent().Define_methodHost(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:33 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute methodHost */ protected boolean canDefine_methodHost(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:34 * @apilevel internal */ public boolean Define_isDest(ASTNode _callerNode, ASTNode _childNode) { if (getLeftNoTransform() != null && _callerNode == getLeft()) { // @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:40 return false; } else { return getParent().Define_isDest(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:34 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute isDest */ protected boolean canDefine_isDest(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:44 * @apilevel internal */ public boolean Define_isSource(ASTNode _callerNode, ASTNode _childNode) { if (getLeftNoTransform() != null && _callerNode == getLeft()) { // @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:50 return true; } else { return getParent().Define_isSource(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:44 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute isSource */ protected boolean canDefine_isSource(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:256 * @apilevel internal */ public boolean Define_assignedBefore(ASTNode _callerNode, ASTNode _childNode, Variable v) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:400 return getLeft().assignedAfter(v); } else { return getParent().Define_assignedBefore(this, _callerNode, v); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:256 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute assignedBefore */ protected boolean canDefine_assignedBefore(ASTNode _callerNode, ASTNode _childNode, Variable v) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:887 * @apilevel internal */ public boolean Define_unassignedBefore(ASTNode _callerNode, ASTNode _childNode, Variable v) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:1088 return getLeft().unassignedAfter(v); } else { return getParent().Define_unassignedBefore(this, _callerNode, v); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:887 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute unassignedBefore */ protected boolean canDefine_unassignedBefore(ASTNode _callerNode, ASTNode _childNode, Variable v) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/LookupMethod.jrag:98 * @apilevel internal */ public Expr Define_nestedScope(ASTNode _callerNode, ASTNode _childNode) { int childIndex = this.getIndexOfChild(_callerNode); return isQualified() ? nestedScope() : this; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/LookupMethod.jrag:98 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute nestedScope */ protected boolean canDefine_nestedScope(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/LookupMethod.jrag:116 * @apilevel internal */ public Collection Define_lookupMethod(ASTNode _callerNode, ASTNode _childNode, String name) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/LookupMethod.jrag:194 return getLeft().type().memberMethods(name); } else { return getParent().Define_lookupMethod(this, _callerNode, name); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/LookupMethod.jrag:116 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute lookupMethod */ protected boolean canDefine_lookupMethod(ASTNode _callerNode, ASTNode _childNode, String name) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:672 * @apilevel internal */ public TypeDecl Define_enclosingInstance(ASTNode _callerNode, ASTNode _childNode) { if (getRightNoTransform() != null && _callerNode == getRight()) { // @declaredat /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:689 return getLeft().type(); } else { return getParent().Define_enclosingInstance(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:672 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute enclosingInstance */ protected boolean canDefine_enclosingInstance(ASTNode _callerNode, ASTNode _childNode) { return true; } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } /** @apilevel internal */ public boolean canRewrite() { return false; } /** @apilevel internal */ protected void collect_contributors_TypeDecl_accessors(CompilationUnit _root, java.util.Map> _map) { // @declaredat /home/jesper/git/extendj/java4/backend/GenerateClassfile.jrag:400 if (requiresSuperAccessor()) { { TypeDecl target = (TypeDecl) (((SuperAccess) leftSide()).superAccessorTarget()); java.util.Set contributors = _map.get(target); if (contributors == null) { contributors = new java.util.LinkedHashSet(); _map.put((ASTNode) target, contributors); } contributors.add(this); } } super.collect_contributors_TypeDecl_accessors(_root, _map); } /** @apilevel internal */ protected void contributeTo_TypeDecl_accessors(HashSet collection) { super.contributeTo_TypeDecl_accessors(collection); if (requiresSuperAccessor()) { collection.add(((SuperAccess) leftSide()).superAccessorTarget() .superAccessor(superAccessorTargetMethod())); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy