1 /** 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 package org.apache.activemq.systest.task; 18 19 import org.codehaus.jam.JAnnotation; 20 import org.codehaus.jam.JAnnotationValue; 21 import org.codehaus.jam.JClass; 22 import org.codehaus.jam.JComment; 23 import org.codehaus.jam.JConstructor; 24 import org.codehaus.jam.JElement; 25 import org.codehaus.jam.JField; 26 import org.codehaus.jam.JMethod; 27 import org.codehaus.jam.JPackage; 28 import org.codehaus.jam.JProperty; 29 import org.codehaus.jam.JSourcePosition; 30 import org.codehaus.jam.JamClassLoader; 31 import org.codehaus.jam.visitor.JVisitor; 32 33 /** 34 * 35 * @version $Revision: 1.1 $ 36 */ 37 public class ScenarioJClassStub implements JClass { 38 protected static final String[] EMPTY_ARRAY = {}; 39 40 private final String qualifiedName; 41 private final String[] interfaceNames; 42 private final String simpleName; 43 private JClass[] interfaces; 44 45 public ScenarioJClassStub(String qualifiedName, String[] interfaceNames) { 46 this.qualifiedName = qualifiedName; 47 this.interfaceNames = interfaceNames; 48 49 int idx = qualifiedName.lastIndexOf('.'); 50 if (idx > 0) { 51 this.simpleName = qualifiedName.substring(idx + 1); 52 } 53 else { 54 this.simpleName = qualifiedName; 55 } 56 } 57 58 public JPackage getContainingPackage() { 59 return null; 60 } 61 62 public JClass getSuperclass() { 63 return null; 64 } 65 66 public JClass[] getInterfaces() { 67 if (interfaces == null) { 68 int size = interfaceNames.length; 69 interfaces = new JClass[size]; 70 for (int i = 0; i < interfaceNames.length; i++) { 71 interfaces[i] = new ScenarioJClassStub(interfaceNames[i], EMPTY_ARRAY); 72 } 73 } 74 return interfaces; 75 } 76 77 public JField[] getFields() { 78 return null; 79 } 80 81 public JField[] getDeclaredFields() { 82 return null; 83 } 84 85 public JMethod[] getMethods() { 86 return null; 87 } 88 89 public JMethod[] getDeclaredMethods() { 90 return null; 91 } 92 93 public JConstructor[] getConstructors() { 94 return null; 95 } 96 97 public JProperty[] getProperties() { 98 return null; 99 } 100 101 public JProperty[] getDeclaredProperties() { 102 return null; 103 } 104 105 public boolean isInterface() { 106 return false; 107 } 108 109 public boolean isAnnotationType() { 110 return false; 111 } 112 113 public boolean isPrimitiveType() { 114 return false; 115 } 116 117 public boolean isBuiltinType() { 118 return false; 119 } 120 121 public Class getPrimitiveClass() { 122 return null; 123 } 124 125 public boolean isFinal() { 126 return false; 127 } 128 129 public boolean isStatic() { 130 return false; 131 } 132 133 public boolean isAbstract() { 134 return false; 135 } 136 137 public boolean isVoidType() { 138 return false; 139 } 140 141 public boolean isObjectType() { 142 return false; 143 } 144 145 public boolean isArrayType() { 146 return false; 147 } 148 149 public JClass getArrayComponentType() { 150 return null; 151 } 152 153 public int getArrayDimensions() { 154 return 0; 155 } 156 157 public boolean isAssignableFrom(JClass arg0) { 158 return false; 159 } 160 161 public JClass[] getClasses() { 162 return null; 163 } 164 165 public JClass getContainingClass() { 166 return null; 167 } 168 169 public String getFieldDescriptor() { 170 return null; 171 } 172 173 public boolean isEnumType() { 174 return false; 175 } 176 177 public JamClassLoader getClassLoader() { 178 return null; 179 } 180 181 public JClass forName(String arg0) { 182 return null; 183 } 184 185 public JClass[] getImportedClasses() { 186 return null; 187 } 188 189 public JPackage[] getImportedPackages() { 190 return null; 191 } 192 193 public boolean isUnresolvedType() { 194 return false; 195 } 196 197 public int getModifiers() { 198 return 0; 199 } 200 201 public boolean isPackagePrivate() { 202 return false; 203 } 204 205 public boolean isPrivate() { 206 return false; 207 } 208 209 public boolean isProtected() { 210 return false; 211 } 212 213 public boolean isPublic() { 214 return false; 215 } 216 217 public JAnnotation[] getAnnotations() { 218 return null; 219 } 220 221 public JAnnotation getAnnotation(Class arg0) { 222 return null; 223 } 224 225 public Object getAnnotationProxy(Class arg0) { 226 return null; 227 } 228 229 public JAnnotation getAnnotation(String arg0) { 230 return null; 231 } 232 233 public JAnnotationValue getAnnotationValue(String arg0) { 234 return null; 235 } 236 237 public JComment getComment() { 238 return null; 239 } 240 241 public JAnnotation[] getAllJavadocTags() { 242 return null; 243 } 244 245 public JElement getParent() { 246 return null; 247 } 248 249 public String getSimpleName() { 250 return simpleName; 251 } 252 253 public String getQualifiedName() { 254 return qualifiedName; 255 } 256 257 public JSourcePosition getSourcePosition() { 258 return null; 259 } 260 261 public void accept(JVisitor arg0) { 262 } 263 264 public Object getArtifact() { 265 return null; 266 } 267 268 }