1 24 25 package org.aspectj.compiler.base.cst; 26 27 import java.util.*; 28 import org.aspectj.compiler.base.ast.*; 29 import org.aspectj.compiler.base.*; 30 import org.aspectj.compiler.base.cst.*; 31 32 import org.aspectj.compiler.base.CodeWriter; 33 34 35 39 40 public class UnresolvedNameTypeD extends TypeD { 41 public Type getType() { 42 return getTypeManager().TYPE_NOT_FOUND; 43 } 44 45 46 public ASTObject postScope(ScopeWalker walker) { 48 Type resolvedType = name.resolveType(walker.getScope()); 49 return new ResolvedTypeD(getSourceLocation(), resolvedType); 50 } 51 52 protected Name name; 54 public Name getName() { return name; } 55 public void setName(Name _name) { 56 if (_name != null) _name.setParent(this); 57 name = _name; 58 } 59 60 public UnresolvedNameTypeD(SourceLocation location, Name _name) { 61 super(location); 62 setName(_name); 63 } 64 protected UnresolvedNameTypeD(SourceLocation source) { 65 super(source); 66 } 67 68 public ASTObject copyWalk(CopyWalker walker) { 69 UnresolvedNameTypeD ret = new UnresolvedNameTypeD(getSourceLocation()); 70 ret.preCopy(walker, this); 71 if (name != null) ret.setName( (Name)walker.process(name) ); 72 return ret; 73 } 74 75 public ASTObject getChildAt(int childIndex) { 76 switch(childIndex) { 77 case 0: return name; 78 default: return super.getChildAt(childIndex); 79 } 80 } 81 public String getChildNameAt(int childIndex) { 82 switch(childIndex) { 83 case 0: return "name"; 84 default: return super.getChildNameAt(childIndex); 85 } 86 } 87 public void setChildAt(int childIndex, ASTObject child) { 88 switch(childIndex) { 89 case 0: setName((Name)child); return; 90 default: super.setChildAt(childIndex, child); return; 91 } 92 } 93 public int getChildCount() { 94 return 1; 95 } 96 97 public String getDefaultDisplayName() { 98 return "UnresolvedNameTypeD()"; 99 } 100 101 } 103 | Popular Tags |