📄 unknowntype.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 UnknownType extends ClassDecl implements Cloneable {
public void flushCache() { super.flushCache(); instanceOf_TypeDecl_values = null; typeDescriptor_computed = false; typeDescriptor_value = null; } @SuppressWarnings({"unchecked", "cast"}) public UnknownType clone() throws CloneNotSupportedException { UnknownType node = (UnknownType)super.clone(); node.instanceOf_TypeDecl_values = null; node.typeDescriptor_computed = false; node.typeDescriptor_value = null; node.in$Circle(false); node.is$Final(false); return node; } @SuppressWarnings({"unchecked", "cast"}) public UnknownType copy() { try { UnknownType node = (UnknownType)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 UnknownType fullCopy() { UnknownType res = (UnknownType)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 47
public UnknownType() { super();
setChild(new Opt(), 1);
setChild(new List(), 2);
setChild(new List(), 3);
} // Declared in java.ast at line 13
// Declared in java.ast line 47 public UnknownType(Modifiers p0, String p1, Opt<Access> p2, List<Access> p3, List<BodyDecl> p4) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); setChild(p4, 3); } // Declared in java.ast at line 22 // Declared in java.ast line 47 public UnknownType(Modifiers p0, beaver.Symbol p1, Opt<Access> p2, List<Access> p3, List<BodyDecl> p4) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); setChild(p4, 3); } // Declared in java.ast at line 30 protected int numChildren() {
return 4;
} // Declared in java.ast at line 33
public boolean mayHaveRewrite() { return false; } // Declared in java.ast at line 2 // Declared in java.ast line 63 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 63 public void setSuperClassAccessOpt(Opt<Access> opt) { setChild(opt, 1); } // Declared in java.ast at line 6 public boolean hasSuperClassAccess() { return getSuperClassAccessOpt().getNumChild() != 0; } // Declared in java.ast at line 10 @SuppressWarnings({"unchecked", "cast"}) public Access getSuperClassAccess() { return (Access)getSuperClassAccessOpt().getChild(0); } // Declared in java.ast at line 14 public void setSuperClassAccess(Access node) { getSuperClassAccessOpt().setChild(node, 0); } // Declared in java.ast at line 17 @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOpt() { return (Opt<Access>)getChild(1); } // Declared in java.ast at line 21 @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOptNoTransform() { return (Opt<Access>)getChildNoTransform(1); } // Declared in java.ast at line 2 // Declared in java.ast line 63 public void setImplementsList(List<Access> list) { setChild(list, 2); } // Declared in java.ast at line 6 private int getNumImplements = 0; // Declared in java.ast at line 7 public int getNumImplements() { return getImplementsList().getNumChild(); } // Declared in java.ast at line 11 @SuppressWarnings({"unchecked", "cast"}) public Access getImplements(int i) { return (Access)getImplementsList().getChild(i); } // Declared in java.ast at line 15 public void addImplements(Access node) { List<Access> list = getImplementsList(); list.addChild(node); } // Declared in java.ast at line 20 public void setImplements(Access node, int i) { List<Access> list = getImplementsList(); list.setChild(node, i); } // Declared in java.ast at line 24 public List<Access> getImplementss() { return getImplementsList(); } // Declared in java.ast at line 27 public List<Access> getImplementssNoTransform() { return getImplementsListNoTransform(); } // Declared in java.ast at line 31 @SuppressWarnings({"unchecked", "cast"}) public List<Access> getImplementsList() { return (List<Access>)getChild(2); } // Declared in java.ast at line 35 @SuppressWarnings({"unchecked", "cast"}) public List<Access> getImplementsListNoTransform() { return (List<Access>)getChildNoTransform(2); } // Declared in java.ast at line 2 // Declared in java.ast line 63 public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 3); } // 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(3); } // Declared in java.ast at line 35 @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(3); } // Declared in TypeAnalysis.jrag at line 168 @SuppressWarnings({"unchecked", "cast"}) public boolean isReferenceType() { boolean isReferenceType_value = isReferenceType_compute(); return isReferenceType_value; } private boolean isReferenceType_compute() { return true; } // Declared in TypeAnalysis.jrag at line 171 @SuppressWarnings({"unchecked", "cast"}) public boolean isPrimitiveType() { boolean isPrimitiveType_value = isPrimitiveType_compute(); return isPrimitiveType_value; } private boolean isPrimitiveType_compute() { return true; } // Declared in TypeAnalysis.jrag at line 176 @SuppressWarnings({"unchecked", "cast"}) public boolean isNumericType() { boolean isNumericType_value = isNumericType_compute(); return isNumericType_value; } private boolean isNumericType_compute() { return true; } // Declared in TypeAnalysis.jrag at line 180 @SuppressWarnings({"unchecked", "cast"}) public boolean isIntegralType() { boolean isIntegralType_value = isIntegralType_compute(); return isIntegralType_value; } private boolean isIntegralType_compute() { return true; } // Declared in TypeAnalysis.jrag at line 184 @SuppressWarnings({"unchecked", "cast"}) public boolean isBoolean() { boolean isBoolean_value = isBoolean_compute(); return isBoolean_value; } private boolean isBoolean_compute() { return true; } // Declared in TypeAnalysis.jrag at line 194 @SuppressWarnings({"unchecked", "cast"}) public boolean isInt() { boolean isInt_value = isInt_compute(); return isInt_value; } private boolean isInt_compute() { return true; } // Declared in TypeAnalysis.jrag at line 232 @SuppressWarnings({"unchecked", "cast"}) public boolean isUnknown() { boolean isUnknown_value = isUnknown_compute(); return isUnknown_value; } private boolean isUnknown_compute() { return true; } // Declared in TypeAnalysis.jrag at line 417 @SuppressWarnings({"unchecked", "cast"}) public boolean instanceOf(TypeDecl type) { Object _parameters = type;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(); 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)); return instanceOf_TypeDecl_value; } private boolean instanceOf_compute(TypeDecl type) { return true; } // Declared in TypeAnalysis.jrag at line 418 @SuppressWarnings({"unchecked", "cast"}) public boolean isSupertypeOfClassDecl(ClassDecl type) { boolean isSupertypeOfClassDecl_ClassDecl_value = isSupertypeOfClassDecl_compute(type); return isSupertypeOfClassDecl_ClassDecl_value; } private boolean isSupertypeOfClassDecl_compute(ClassDecl type) { return true; } // Declared in TypeAnalysis.jrag at line 419 @SuppressWarnings({"unchecked", "cast"}) public boolean isSupertypeOfInterfaceDecl(InterfaceDecl type) { boolean isSupertypeOfInterfaceDecl_InterfaceDecl_value = isSupertypeOfInterfaceDecl_compute(type); return isSupertypeOfInterfaceDecl_InterfaceDecl_value; } private boolean isSupertypeOfInterfaceDecl_compute(InterfaceDecl type) { return true; } // Declared in TypeAnalysis.jrag at line 420 @SuppressWarnings({"unchecked", "cast"}) public boolean isSupertypeOfArrayDecl(ArrayDecl type) { boolean isSupertypeOfArrayDecl_ArrayDecl_value = isSupertypeOfArrayDecl_compute(type); return isSupertypeOfArrayDecl_ArrayDecl_value; } private boolean isSupertypeOfArrayDecl_compute(ArrayDecl type) { return true; } // Declared in TypeAnalysis.jrag at line 421 @SuppressWarnings({"unchecked", "cast"}) public boolean isSupertypeOfPrimitiveType(PrimitiveType type) { boolean isSupertypeOfPrimitiveType_PrimitiveType_value = isSupertypeOfPrimitiveType_compute(type); return isSupertypeOfPrimitiveType_PrimitiveType_value; } private boolean isSupertypeOfPrimitiveType_compute(PrimitiveType type) { return true; } // Declared in TypeAnalysis.jrag at line 422 @SuppressWarnings({"unchecked", "cast"}) public boolean isSupertypeOfNullType(NullType type) { boolean isSupertypeOfNullType_NullType_value = isSupertypeOfNullType_compute(type); return isSupertypeOfNullType_NullType_value; } private boolean isSupertypeOfNullType_compute(NullType type) { return true; } // Declared in ConstantPoolNames.jrag at line 32 @SuppressWarnings({"unchecked", "cast"}) public String typeDescriptor() { if(typeDescriptor_computed) return typeDescriptor_value; int num = boundariesCrossed; boolean isFinal = this.is$Final(); typeDescriptor_value = typeDescriptor_compute(); if(isFinal && num == boundariesCrossed) typeDescriptor_computed = true; return typeDescriptor_value; } private String typeDescriptor_compute() { throw new Error("Trying to make a typeDescriptor() of Unknown"); }public ASTNode rewriteTo() { return super.rewriteTo();}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -