1 2 29 package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify; 30 31 32 33 import java.util.Iterator ; 34 import java.util.List ; 35 import java.util.Vector ; 36 37 38 39 public class UnknownClass implements IClass { 40 41 String _name; 42 SymTabAST _node; 43 44 public UnknownClass(String name, SymTabAST node) { 45 _name = name; 46 _node = node; 47 } 49 50 55 public IClass getSuperclass() { 56 return null; 57 } 58 59 public IClass[] getInterfaces() { 60 return new IClass[0]; 61 } 62 63 68 public List getSubclasses() { 69 return new Vector (); 70 } 71 72 public IClass getClassDefinition(String name) { 73 return null; 74 } 75 76 86 public IMethod getMethodDefinition(String name, 87 ISignature signature) { 88 return null; 89 } 90 91 98 public IVariable getVariableDefinition(String name) { 99 return null; 100 } 101 102 104 110 public void addSubclass(ClassDef subclass) {} 111 112 118 public void addImplementor(ClassDef implementor) {} 119 120 125 public List getImplementors() { 126 return new Vector (); 127 } 128 129 public boolean isCompatibleWith(IClass type) { 130 return false; 131 } 132 133 public void addReference(Reference reference) {} 134 public Iterator getReferences() { 135 return new Vector ().iterator(); 136 } 137 138 public int getNumReferences() { 139 return 0; 140 } 141 142 public boolean isPrimitive() { 143 return false; 144 } 145 146 public boolean isSourced() { 147 return false; 148 } 149 150 public IClass[] getInnerClasses() { 151 return new IClass[0]; 152 } 153 154 public String getName() { 155 return _name; 156 } 157 158 public String getQualifiedName() { 159 return _name; 160 } 161 162 public boolean equals(Object o) { 163 if (o instanceof UnknownClass) { 165 final UnknownClass other = (UnknownClass) o; 166 return other.getName().equals(getName()); 167 } 168 return false; 169 } 170 171 public String toString() { 172 return UnknownClass.class + "[" + getName() + "]"; 173 } 174 } 175 | Popular Tags |