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

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

There is a newer version: 8.1.2
Show newest version
/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.0 */
package org.extendj.ast;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
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.*;
import java.util.zip.*;
import java.io.*;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import org.jastadd.util.PrettyPrintable;
import org.jastadd.util.PrettyPrinter;
import java.io.FileNotFoundException;
import java.io.InputStream;
import org.jastadd.util.*;
import java.io.File;
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;
/**
 * @ast node
 * @declaredat /home/jesper/git/extendj/java4/grammar/Java.ast:169
 * @astdecl VarDeclStmt : Stmt ::= Modifiers TypeAccess:Access Declarator:VariableDeclarator*;
 * @production VarDeclStmt : {@link Stmt} ::= {@link Modifiers} TypeAccess:{@link Access} Declarator:{@link VariableDeclarator}*;

 */
public class VarDeclStmt extends Stmt implements Cloneable {
  /**
   * @aspect Java4PrettyPrint
   * @declaredat /home/jesper/git/extendj/java4/frontend/PrettyPrint.jadd:629
   */
  public void prettyPrint(PrettyPrinter out) {
    out.print(getModifiers());
    out.print(getTypeAccess());
    out.print(" ");
    out.join(getDeclaratorList(), new PrettyPrinter.Joiner() {
      @Override
      public void printSeparator(PrettyPrinter out) {
        out.print(", ");
      }
    });
    out.print(";");
  }
  /**
   * @aspect CreateBCode
   * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:317
   */
  public void createBCode(CodeGeneration gen) {
    gen.addLineNumberEntryAtCurrentPC(this); // Generate line number entry.
    for (VariableDeclarator decl : getDeclaratorList()) {
      decl.createBCode(gen);
    }
  }
  /**
   * @declaredat ASTNode:1
   */
  public VarDeclStmt() {
    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[3];
    setChild(new List(), 2);
  }
  /**
   * @declaredat ASTNode:14
   */
  @ASTNodeAnnotation.Constructor(
    name = {"Modifiers", "TypeAccess", "Declarator"},
    type = {"Modifiers", "Access", "List"},
    kind = {"Child", "Child", "List"}
  )
  public VarDeclStmt(Modifiers p0, Access p1, List p2) {
    setChild(p0, 0);
    setChild(p1, 1);
    setChild(p2, 2);
  }
  /** @apilevel low-level 
   * @declaredat ASTNode:25
   */
  protected int numChildren() {
    return 3;
  }
  /**
   * @apilevel internal
   * @declaredat ASTNode:31
   */
  public boolean mayHaveRewrite() {
    return false;
  }
  /** @apilevel internal 
   * @declaredat ASTNode:35
   */
  public void flushAttrCache() {
    super.flushAttrCache();
    canCompleteNormally_reset();
    assignedAfter_Variable_reset();
    unassignedAfter_Variable_reset();
    localSize_reset();
  }
  /** @apilevel internal 
   * @declaredat ASTNode:43
   */
  public void flushCollectionCache() {
    super.flushCollectionCache();
  }
  /** @apilevel internal 
   * @declaredat ASTNode:47
   */
  public VarDeclStmt clone() throws CloneNotSupportedException {
    VarDeclStmt node = (VarDeclStmt) super.clone();
    return node;
  }
  /** @apilevel internal 
   * @declaredat ASTNode:52
   */
  public VarDeclStmt copy() {
    try {
      VarDeclStmt node = (VarDeclStmt) 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 VarDeclStmt 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 VarDeclStmt treeCopyNoTransform() {
    VarDeclStmt tree = (VarDeclStmt) 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 VarDeclStmt treeCopy() {
    VarDeclStmt tree = (VarDeclStmt) 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 Modifiers child.
   * @param node The new node to replace the Modifiers child.
   * @apilevel high-level
   */
  public void setModifiers(Modifiers node) {
    setChild(node, 0);
  }
  /**
   * Retrieves the Modifiers child.
   * @return The current node used as the Modifiers child.
   * @apilevel high-level
   */
  @ASTNodeAnnotation.Child(name="Modifiers")
  public Modifiers getModifiers() {
    return (Modifiers) getChild(0);
  }
  /**
   * Retrieves the Modifiers child.
   * 

This method does not invoke AST transformations.

* @return The current node used as the Modifiers child. * @apilevel low-level */ public Modifiers getModifiersNoTransform() { return (Modifiers) getChildNoTransform(0); } /** * Replaces the TypeAccess child. * @param node The new node to replace the TypeAccess child. * @apilevel high-level */ public void setTypeAccess(Access node) { setChild(node, 1); } /** * Retrieves the TypeAccess child. * @return The current node used as the TypeAccess child. * @apilevel high-level */ @ASTNodeAnnotation.Child(name="TypeAccess") public Access getTypeAccess() { return (Access) getChild(1); } /** * Retrieves the TypeAccess child. *

This method does not invoke AST transformations.

* @return The current node used as the TypeAccess child. * @apilevel low-level */ public Access getTypeAccessNoTransform() { return (Access) getChildNoTransform(1); } /** * Replaces the Declarator list. * @param list The new list node to be used as the Declarator list. * @apilevel high-level */ public void setDeclaratorList(List list) { setChild(list, 2); } /** * Retrieves the number of children in the Declarator list. * @return Number of children in the Declarator list. * @apilevel high-level */ public int getNumDeclarator() { return getDeclaratorList().getNumChild(); } /** * Retrieves the number of children in the Declarator list. * Calling this method will not trigger rewrites. * @return Number of children in the Declarator list. * @apilevel low-level */ public int getNumDeclaratorNoTransform() { return getDeclaratorListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Declarator list. * @param i Index of the element to return. * @return The element at position {@code i} in the Declarator list. * @apilevel high-level */ public VariableDeclarator getDeclarator(int i) { return (VariableDeclarator) getDeclaratorList().getChild(i); } /** * Check whether the Declarator list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ public boolean hasDeclarator() { return getDeclaratorList().getNumChild() != 0; } /** * Append an element to the Declarator list. * @param node The element to append to the Declarator list. * @apilevel high-level */ public void addDeclarator(VariableDeclarator node) { List list = (parent == null) ? getDeclaratorListNoTransform() : getDeclaratorList(); list.addChild(node); } /** @apilevel low-level */ public void addDeclaratorNoTransform(VariableDeclarator node) { List list = getDeclaratorListNoTransform(); list.addChild(node); } /** * Replaces the Declarator list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ public void setDeclarator(VariableDeclarator node, int i) { List list = getDeclaratorList(); list.setChild(node, i); } /** * Retrieves the Declarator list. * @return The node representing the Declarator list. * @apilevel high-level */ @ASTNodeAnnotation.ListChild(name="Declarator") public List getDeclaratorList() { List list = (List) getChild(2); return list; } /** * Retrieves the Declarator list. *

This method does not invoke AST transformations.

* @return The node representing the Declarator list. * @apilevel low-level */ public List getDeclaratorListNoTransform() { return (List) getChildNoTransform(2); } /** * @return the element at index {@code i} in the Declarator list without * triggering rewrites. */ public VariableDeclarator getDeclaratorNoTransform(int i) { return (VariableDeclarator) getDeclaratorListNoTransform().getChildNoTransform(i); } /** * Retrieves the Declarator list. * @return The node representing the Declarator list. * @apilevel high-level */ public List getDeclarators() { return getDeclaratorList(); } /** * Retrieves the Declarator list. *

This method does not invoke AST transformations.

* @return The node representing the Declarator list. * @apilevel low-level */ public List getDeclaratorsNoTransform() { return getDeclaratorListNoTransform(); } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:275 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="TypeAnalysis", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:275") public TypeDecl type() { TypeDecl type_value = getTypeAccess().type(); return type_value; } /** @apilevel internal */ private void canCompleteNormally_reset() { canCompleteNormally_computed = null; } /** @apilevel internal */ protected ASTState.Cycle canCompleteNormally_computed = null; /** @apilevel internal */ protected boolean canCompleteNormally_value; /** * @attribute syn * @aspect UnreachableStatements * @declaredat /home/jesper/git/extendj/java4/frontend/UnreachableStatements.jrag:50 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="UnreachableStatements", declaredAt="/home/jesper/git/extendj/java4/frontend/UnreachableStatements.jrag:50") public boolean canCompleteNormally() { ASTState state = state(); if (canCompleteNormally_computed == ASTState.NON_CYCLE || canCompleteNormally_computed == state().cycle()) { return canCompleteNormally_value; } canCompleteNormally_value = reachable(); if (state().inCircle()) { canCompleteNormally_computed = state().cycle(); } else { canCompleteNormally_computed = ASTState.NON_CYCLE; } return canCompleteNormally_value; } /** @apilevel internal */ private void assignedAfter_Variable_reset() { assignedAfter_Variable_values = null; } protected java.util.Map assignedAfter_Variable_values; @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isCircular=true) @ASTNodeAnnotation.Source(aspect="DefiniteAssignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:264") public boolean assignedAfter(Variable v) { Object _parameters = v; if (assignedAfter_Variable_values == null) assignedAfter_Variable_values = new java.util.HashMap(4); ASTState.CircularValue _value; if (assignedAfter_Variable_values.containsKey(_parameters)) { Object _cache = assignedAfter_Variable_values.get(_parameters); if (!(_cache instanceof ASTState.CircularValue)) { return (Boolean) _cache; } else { _value = (ASTState.CircularValue) _cache; } } else { _value = new ASTState.CircularValue(); assignedAfter_Variable_values.put(_parameters, _value); _value.value = true; } ASTState state = state(); if (!state.inCircle() || state.calledByLazyAttribute()) { state.enterCircle(); boolean new_assignedAfter_Variable_value; do { _value.cycle = state.nextCycle(); new_assignedAfter_Variable_value = getDeclarator(getNumDeclarator() - 1).assignedAfter(v); if (((Boolean)_value.value) != new_assignedAfter_Variable_value) { state.setChangeInCycle(); _value.value = new_assignedAfter_Variable_value; } } while (state.testAndClearChangeInCycle()); assignedAfter_Variable_values.put(_parameters, new_assignedAfter_Variable_value); state.leaveCircle(); return new_assignedAfter_Variable_value; } else if (_value.cycle != state.cycle()) { _value.cycle = state.cycle(); boolean new_assignedAfter_Variable_value = getDeclarator(getNumDeclarator() - 1).assignedAfter(v); if (((Boolean)_value.value) != new_assignedAfter_Variable_value) { state.setChangeInCycle(); _value.value = new_assignedAfter_Variable_value; } return new_assignedAfter_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:895") 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 = getDeclarator(getNumDeclarator() - 1).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 = getDeclarator(getNumDeclarator() - 1).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 VariableScope * @declaredat /home/jesper/git/extendj/java4/frontend/LookupVariable.jrag:219 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="VariableScope", declaredAt="/home/jesper/git/extendj/java4/frontend/LookupVariable.jrag:219") public VariableDeclarator variableDeclaration(String name) { { for (VariableDeclarator decl : getDeclaratorList()) { if (decl.declaresVariable(name)) { return decl; } } return null; } } /** @apilevel internal */ private void localSize_reset() { localSize_computed = null; } /** @apilevel internal */ protected ASTState.Cycle localSize_computed = null; /** @apilevel internal */ protected int localSize_value; /** * Computes size required for local variables of this statement. * NB: only relevant for variable declaration statements. * @return local size for declared variables * @attribute syn * @aspect LocalNum * @declaredat /home/jesper/git/extendj/java4/backend/LocalNum.jrag:38 */ @ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN) @ASTNodeAnnotation.Source(aspect="LocalNum", declaredAt="/home/jesper/git/extendj/java4/backend/LocalNum.jrag:38") public int localSize() { ASTState state = state(); if (localSize_computed == ASTState.NON_CYCLE || localSize_computed == state().cycle()) { return localSize_value; } localSize_value = localSize_compute(); if (state().inCircle()) { localSize_computed = state().cycle(); } else { localSize_computed = ASTState.NON_CYCLE; } return localSize_value; } /** @apilevel internal */ private int localSize_compute() { int size = 0; for (VariableDeclarator decl : getDeclaratorList()) { size += decl.localSize(); } return size; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:277 * @apilevel internal */ public TypeDecl Define_declType(ASTNode _callerNode, ASTNode _childNode) { if (_callerNode == getDeclaratorListNoTransform()) { // @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:280 int childIndex = _callerNode.getIndexOfChild(_childNode); return null; } else { return getParent().Define_declType(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:277 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute declType */ protected boolean canDefine_declType(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/VariableDeclaration.jrag:133 * @apilevel internal */ public Modifiers Define_declarationModifiers(ASTNode _callerNode, ASTNode _childNode) { if (_callerNode == getDeclaratorListNoTransform()) { // @declaredat /home/jesper/git/extendj/java4/frontend/VariableDeclaration.jrag:135 int index = _callerNode.getIndexOfChild(_childNode); return getModifiers(); } else { return getParent().Define_declarationModifiers(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/VariableDeclaration.jrag:133 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute declarationModifiers */ protected boolean canDefine_declarationModifiers(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/VariableDeclaration.jrag:144 * @apilevel internal */ public Access Define_declarationType(ASTNode _callerNode, ASTNode _childNode) { if (_callerNode == getDeclaratorListNoTransform()) { // @declaredat /home/jesper/git/extendj/java4/frontend/VariableDeclaration.jrag:146 int index = _callerNode.getIndexOfChild(_childNode); return getTypeAccess(); } else { return getParent().Define_declarationType(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/VariableDeclaration.jrag:144 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute declarationType */ protected boolean canDefine_declarationType(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:36 * @apilevel internal */ public NameType Define_nameType(ASTNode _callerNode, ASTNode _childNode) { if (getTypeAccessNoTransform() != null && _callerNode == getTypeAccess()) { // @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:107 return NameType.TYPE_NAME; } 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/DefiniteAssignment.jrag:66 * @apilevel internal */ public boolean Define_isIncOrDec(ASTNode _callerNode, ASTNode _childNode) { if (_callerNode == getDeclaratorListNoTransform()) { // @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:70 int childIndex = _callerNode.getIndexOfChild(_childNode); return false; } else { return getParent().Define_isIncOrDec(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:66 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute isIncOrDec */ protected boolean canDefine_isIncOrDec(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 (_callerNode == getDeclaratorListNoTransform()) { // @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:560 int index = _callerNode.getIndexOfChild(_childNode); return index == 0 ? assignedBefore(v) : getDeclarator(index - 1).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 (_callerNode == getDeclaratorListNoTransform()) { // @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:1167 int index = _callerNode.getIndexOfChild(_childNode); return index == 0 ? unassignedBefore(v) : getDeclarator(index - 1).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/LookupVariable.jrag:42 * @apilevel internal */ public SimpleSet Define_lookupVariable(ASTNode _callerNode, ASTNode _childNode, String name) { if (_callerNode == getDeclaratorListNoTransform()) { // @declaredat /home/jesper/git/extendj/java4/frontend/LookupVariable.jrag:114 int index = _callerNode.getIndexOfChild(_childNode); { for (int i = index - 1; i >= 0; i -= 1) { if (getDeclarator(i).declaresVariable(name)) { return getDeclarator(i); } } return lookupVariable(name); } } else { return getParent().Define_lookupVariable(this, _callerNode, name); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/LookupVariable.jrag:42 * @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/Modifiers.jrag:436 * @apilevel internal */ public boolean Define_mayBeFinal(ASTNode _callerNode, ASTNode _childNode) { if (getModifiersNoTransform() != null && _callerNode == getModifiers()) { // @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:322 return true; } else { return getParent().Define_mayBeFinal(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:436 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute mayBeFinal */ protected boolean canDefine_mayBeFinal(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:438 * @apilevel internal */ public boolean Define_mayBeVolatile(ASTNode _callerNode, ASTNode _childNode) { if (getModifiersNoTransform() != null && _callerNode == getModifiers()) { // @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:323 return true; } else { return getParent().Define_mayBeVolatile(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/frontend/Modifiers.jrag:438 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute mayBeVolatile */ protected boolean canDefine_mayBeVolatile(ASTNode _callerNode, ASTNode _childNode) { return true; } /** * @declaredat /home/jesper/git/extendj/java4/backend/LocalNum.jrag:63 * @apilevel internal */ public int Define_localNum(ASTNode _callerNode, ASTNode _childNode) { if (_callerNode == getDeclaratorListNoTransform()) { // @declaredat /home/jesper/git/extendj/java4/backend/LocalNum.jrag:52 int index = _callerNode.getIndexOfChild(_childNode); { if (index == 0) { return localNum(); } else { return getDeclarator(index - 1).localNum() + getDeclarator(index - 1).localSize(); } } } else { return getParent().Define_localNum(this, _callerNode); } } /** * @declaredat /home/jesper/git/extendj/java4/backend/LocalNum.jrag:63 * @apilevel internal * @return {@code true} if this node has an equation for the inherited attribute localNum */ protected boolean canDefine_localNum(ASTNode _callerNode, ASTNode _childNode) { return true; } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } /** @apilevel internal */ public boolean canRewrite() { return false; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy