⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 voidtype.java

📁 JDK1.4编译器前端
💻 JAVA
字号:

package AST;
import java.util.HashSet;import java.util.LinkedHashSet;import java.io.FileNotFoundException;import java.io.File;import java.util.*;import beaver.*;import java.util.ArrayList;import java.util.zip.*;import java.io.*;public class VoidType extends TypeDecl implements Cloneable {
    public void flushCache() {        super.flushCache();        stringConversion_visited = -1;        isVoid_visited = -1;        instanceOf_TypeDecl_visited = new java.util.HashMap(4);        instanceOf_TypeDecl_values = null;        isSupertypeOfVoidType_VoidType_visited = new java.util.HashMap(4);    }     @SuppressWarnings({"unchecked", "cast"})  public VoidType clone() throws CloneNotSupportedException {        VoidType node = (VoidType)super.clone();        node.stringConversion_visited = -1;        node.isVoid_visited = -1;        node.instanceOf_TypeDecl_visited = new java.util.HashMap(4);        node.instanceOf_TypeDecl_values = null;        node.isSupertypeOfVoidType_VoidType_visited = new java.util.HashMap(4);        node.in$Circle(false);        node.is$Final(false);    return node;    }     @SuppressWarnings({"unchecked", "cast"})  public VoidType copy() {      try {          VoidType node = (VoidType)clone();          if(children != null) node.children = (ASTNode[])children.clone();          return node;      } catch (CloneNotSupportedException e) {      }      System.err.println("Error: Could not clone node of type " + getClass().getName() + "!");      return null;    }     @SuppressWarnings({"unchecked", "cast"})  public VoidType fullCopy() {        VoidType res = (VoidType)copy();        for(int i = 0; i < getNumChildNoTransform(); i++) {          ASTNode node = getChildNoTransform(i);          if(node != null) node = node.fullCopy();          res.setChild(node, i);        }        return res;    }    // Declared in java.ast at line 3    // Declared in java.ast line 45
    public VoidType() {        super();
        setChild(new List(), 1);

    }    // Declared in java.ast at line 11
    // Declared in java.ast line 45    public VoidType(Modifiers p0, String p1, List<BodyDecl> p2) {        setChild(p0, 0);        setID(p1);        setChild(p2, 1);    }    // Declared in java.ast at line 18    // Declared in java.ast line 45    public VoidType(Modifiers p0, beaver.Symbol p1, List<BodyDecl> p2) {        setChild(p0, 0);        setID(p1);        setChild(p2, 1);    }    // Declared in java.ast at line 24  protected int numChildren() {
    return 2;
  }    // Declared in java.ast at line 27
  public boolean mayHaveRewrite() { return false; }    // Declared in java.ast at line 2    // Declared in java.ast line 38    public void setModifiers(Modifiers node) {        setChild(node, 0);    }    // Declared in java.ast at line 5    public Modifiers getModifiers() {        return (Modifiers)getChild(0);    }    // Declared in java.ast at line 9    public Modifiers getModifiersNoTransform() {        return (Modifiers)getChildNoTransform(0);    }    // Declared in java.ast at line 2    // Declared in java.ast line 38    public void setBodyDeclList(List<BodyDecl> list) {        setChild(list, 1);    }    // Declared in java.ast at line 6    private int getNumBodyDecl = 0;    // Declared in java.ast at line 7    public int getNumBodyDecl() {        return getBodyDeclList().getNumChild();    }    // Declared in java.ast at line 11     @SuppressWarnings({"unchecked", "cast"})  public BodyDecl getBodyDecl(int i) {        return (BodyDecl)getBodyDeclList().getChild(i);    }    // Declared in java.ast at line 15    public void addBodyDecl(BodyDecl node) {        List<BodyDecl> list = getBodyDeclList();        list.addChild(node);    }    // Declared in java.ast at line 20    public void setBodyDecl(BodyDecl node, int i) {        List<BodyDecl> list = getBodyDeclList();        list.setChild(node, i);    }    // Declared in java.ast at line 24    public List<BodyDecl> getBodyDecls() {        return getBodyDeclList();    }    // Declared in java.ast at line 27    public List<BodyDecl> getBodyDeclsNoTransform() {        return getBodyDeclListNoTransform();    }    // Declared in java.ast at line 31     @SuppressWarnings({"unchecked", "cast"})  public List<BodyDecl> getBodyDeclList() {        return (List<BodyDecl>)getChild(1);    }    // Declared in java.ast at line 35     @SuppressWarnings({"unchecked", "cast"})  public List<BodyDecl> getBodyDeclListNoTransform() {        return (List<BodyDecl>)getChildNoTransform(1);    }    protected int stringConversion_visited = -1;    // Declared in TypeAnalysis.jrag at line 57 @SuppressWarnings({"unchecked", "cast"})     public boolean stringConversion() {        if(stringConversion_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: stringConversion in class: ");        stringConversion_visited = boundariesCrossed;        boolean stringConversion_value = stringConversion_compute();        stringConversion_visited = -1;        return stringConversion_value;    }    private boolean stringConversion_compute() {  return false;  }    protected int isVoid_visited = -1;    // Declared in TypeAnalysis.jrag at line 204 @SuppressWarnings({"unchecked", "cast"})     public boolean isVoid() {        if(isVoid_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: isVoid in class: ");        isVoid_visited = boundariesCrossed;        boolean isVoid_value = isVoid_compute();        isVoid_visited = -1;        return isVoid_value;    }    private boolean isVoid_compute() {  return true;  }    protected java.util.Map instanceOf_TypeDecl_visited;    // Declared in TypeAnalysis.jrag at line 415 @SuppressWarnings({"unchecked", "cast"})     public boolean instanceOf(TypeDecl type) {        Object _parameters = type;if(instanceOf_TypeDecl_visited == null) instanceOf_TypeDecl_visited = new java.util.HashMap(4);if(instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4);        if(instanceOf_TypeDecl_values.containsKey(_parameters))            return ((Boolean)instanceOf_TypeDecl_values.get(_parameters)).booleanValue();        if(new Integer(boundariesCrossed).equals(instanceOf_TypeDecl_visited.get(_parameters)))            throw new RuntimeException("Circular definition of attr: instanceOf in class: ");        instanceOf_TypeDecl_visited.put(_parameters, new Integer(boundariesCrossed));        int num = boundariesCrossed;        boolean isFinal = this.is$Final();        boolean instanceOf_TypeDecl_value = instanceOf_compute(type);        if(isFinal && num == boundariesCrossed)            instanceOf_TypeDecl_values.put(_parameters, Boolean.valueOf(instanceOf_TypeDecl_value));        instanceOf_TypeDecl_visited.remove(_parameters);        return instanceOf_TypeDecl_value;    }    private boolean instanceOf_compute(TypeDecl type) {  return type.isSupertypeOfVoidType(this);  }    protected java.util.Map isSupertypeOfVoidType_VoidType_visited;    // Declared in TypeAnalysis.jrag at line 488 @SuppressWarnings({"unchecked", "cast"})     public boolean isSupertypeOfVoidType(VoidType type) {        Object _parameters = type;if(isSupertypeOfVoidType_VoidType_visited == null) isSupertypeOfVoidType_VoidType_visited = new java.util.HashMap(4);        if(new Integer(boundariesCrossed).equals(isSupertypeOfVoidType_VoidType_visited.get(_parameters)))            throw new RuntimeException("Circular definition of attr: isSupertypeOfVoidType in class: ");        isSupertypeOfVoidType_VoidType_visited.put(_parameters, new Integer(boundariesCrossed));        boolean isSupertypeOfVoidType_VoidType_value = isSupertypeOfVoidType_compute(type);        isSupertypeOfVoidType_VoidType_visited.remove(_parameters);        return isSupertypeOfVoidType_VoidType_value;    }    private boolean isSupertypeOfVoidType_compute(VoidType type) {  return true;  }public ASTNode rewriteTo() {    return super.rewriteTo();}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -