Home
last modified time | relevance | path

Searched refs:CtClass (Results 1 – 25 of 83) sorted by relevance

1234

/external/javassist/src/main/javassist/bytecode/analysis/
DType.java24 import javassist.CtClass;
43 private final CtClass clazz;
48 public static final Type DOUBLE = new Type(CtClass.doubleType);
50 public static final Type BOOLEAN = new Type(CtClass.booleanType);
52 public static final Type LONG = new Type(CtClass.longType);
54 public static final Type CHAR = new Type(CtClass.charType);
56 public static final Type BYTE = new Type(CtClass.byteType);
58 public static final Type SHORT = new Type(CtClass.shortType);
60 public static final Type INTEGER = new Type(CtClass.intType);
62 public static final Type FLOAT = new Type(CtClass.floatType);
[all …]
/external/javassist/src/main/javassist/
DClassPool.java185 CtClass[] pt = CtClass.primitiveTypes; in ClassPool()
237 protected CtClass getCached(String classname) { in getCached()
238 return (CtClass)classes.get(classname); in getCached()
248 protected void cacheCtClass(String classname, CtClass c, boolean dynamic) { in cacheCtClass()
259 protected CtClass removeCached(String classname) { in removeCached()
260 return (CtClass)classes.remove(classname); in removeCached()
279 ((CtClass)e.nextElement()).compress(); in compress()
385 public CtClass getAndRename(String orgName, String newName) in getAndRename()
388 CtClass clazz = get0(orgName, false); in getAndRename()
405 synchronized void classNameChanged(String oldname, CtClass clazz) { in classNameChanged()
[all …]
DCtField.java57 public CtField(CtClass type, String name, CtClass declaring) in CtField()
80 public CtField(CtField src, CtClass declaring) in CtField()
96 private CtField(String typeDesc, String name, CtClass clazz) in CtField()
108 CtField(FieldInfo fi, CtClass clazz) { in CtField()
156 public static CtField make(String src, CtClass declaring) in make()
204 public CtClass getDeclaringClass() { in getDeclaringClass()
345 public CtClass getType() throws NotFoundException { in getType()
353 public void setType(CtClass clazz) { in setType()
537 public static Initializer byNew(CtClass objectType) { in byNew()
564 public static Initializer byNew(CtClass objectType, in byNew()
[all …]
DCtNewConstructor.java64 public static CtConstructor make(String src, CtClass declaring) in make()
94 public static CtConstructor make(CtClass[] parameters, in make()
95 CtClass[] exceptions, in make()
96 String body, CtClass declaring) in make()
124 public static CtConstructor copy(CtConstructor c, CtClass declaring, in copy()
135 public static CtConstructor defaultConstructor(CtClass declaring) in defaultConstructor()
138 CtConstructor cons = new CtConstructor((CtClass[])null, declaring); in defaultConstructor()
176 public static CtConstructor skeleton(CtClass[] parameters, in skeleton()
177 CtClass[] exceptions, CtClass declaring) in skeleton()
195 public static CtConstructor make(CtClass[] parameters, in make()
[all …]
DCtNewMethod.java41 public static CtMethod make(String src, CtClass declaring) in make()
64 public static CtMethod make(String src, CtClass declaring, in make()
99 public static CtMethod make(CtClass returnType, in make()
100 String mname, CtClass[] parameters, in make()
101 CtClass[] exceptions, in make()
102 String body, CtClass declaring) in make()
126 public static CtMethod make(int modifiers, CtClass returnType, in make()
127 String mname, CtClass[] parameters, in make()
128 CtClass[] exceptions, in make()
129 String body, CtClass declaring) in make()
[all …]
DCtClass.java49 public abstract class CtClass { class
65 System.out.println("Javassist version " + CtClass.version); in main()
76 public static CtClass booleanType;
82 public static CtClass charType;
88 public static CtClass byteType;
94 public static CtClass shortType;
100 public static CtClass intType;
106 public static CtClass longType;
112 public static CtClass floatType;
118 public static CtClass doubleType;
[all …]
DCtNewWrappedMethod.java27 public static CtMethod wrapped(CtClass returnType, String mname, in wrapped()
28 CtClass[] parameterTypes, in wrapped()
29 CtClass[] exceptionTypes, in wrapped()
31 CtClass declaring) in wrapped()
50 static Bytecode makeBody(CtClass clazz, ClassFile classfile, in makeBody()
52 CtClass[] parameters, in makeBody()
53 CtClass returnType, in makeBody()
69 protected static int makeBody0(CtClass clazz, ClassFile classfile, in makeBody0()
71 boolean isStatic, CtClass[] parameters, in makeBody0()
72 CtClass returnType, ConstParameter cparam, in makeBody0()
[all …]
DCtArray.java21 final class CtArray extends CtClass {
38 private CtClass[] interfaces = null;
50 public CtClass[] getInterfaces() throws NotFoundException { in getInterfaces()
55 interfaces = new CtClass[intfs.length]; in getInterfaces()
63 public boolean subtypeOf(CtClass clazz) throws NotFoundException { in subtypeOf()
71 CtClass[] intfs = getInterfaces(); in subtypeOf()
80 public CtClass getComponentType() throws NotFoundException { in getComponentType()
85 public CtClass getSuperclass() throws NotFoundException { in getSuperclass()
DCtMethod.java36 CtMethod(MethodInfo minfo, CtClass declaring) { in CtMethod()
52 public CtMethod(CtClass returnType, String mname, in CtMethod()
53 CtClass[] parameters, CtClass declaring) { in CtMethod()
109 public CtMethod(CtMethod src, CtClass declaring, ClassMap map) in CtMethod()
126 public static CtMethod make(String src, CtClass declaring) in make()
141 public static CtMethod make(MethodInfo minfo, CtClass declaring) in make()
215 public CtClass getReturnType() throws NotFoundException { in getReturnType()
274 CtClass clazz = getDeclaringClass(); in setWrappedBody()
275 CtClass[] params; in setWrappedBody()
276 CtClass retType; in setWrappedBody()
/external/javassist/sample/vector/
DVectorAssistant.java52 public CtClass[] assist(ClassPool pool, String vec, String[] args) in assist()
60 CtClass subclass; in assist()
61 CtClass elementType = pool.get(args[0]); in assist()
67 CtClass[] results = { subclass, pool.get(vec) }; in assist()
84 public CtClass makeSubclass(ClassPool pool, CtClass type) in makeSubclass()
87 CtClass vec = pool.makeClass(makeClassName(type)); in makeSubclass()
90 CtClass c = pool.get("sample.vector.Sample"); in makeSubclass()
109 public CtClass makeSubclass2(ClassPool pool, CtClass type) in makeSubclass2()
112 CtClass vec = pool.makeClass(makeClassName(type)); in makeSubclass2()
115 CtClass c = pool.get("sample.vector.Sample2"); in makeSubclass2()
[all …]
/external/javassist/src/main/javassist/bytecode/
DBytecode.java18 import javassist.CtClass;
118 public static final CtClass THIS = ConstPool.THIS;
255 public void setMaxLocals(boolean isStatic, CtClass[] params, in setMaxLocals()
261 CtClass doubleType = CtClass.doubleType; in setMaxLocals()
262 CtClass longType = CtClass.longType; in setMaxLocals()
265 CtClass type = params[i]; in setMaxLocals()
287 int handler, CtClass type) { in addExceptionHandler()
518 public void addConstZero(CtClass type) { in addConstZero()
520 if (type == CtClass.longType) in addConstZero()
522 else if (type == CtClass.floatType) in addConstZero()
[all …]
DDescriptor.java19 import javassist.CtClass;
58 public static String toJvmName(CtClass clazz) { in toJvmName()
244 public static String of(CtClass type) { in of()
250 private static void toDescriptor(StringBuffer desc, CtClass type) { in toDescriptor()
280 public static String ofConstructor(CtClass[] paramTypes) { in ofConstructor()
281 return ofMethod(CtClass.voidType, paramTypes); in ofConstructor()
291 public static String ofMethod(CtClass returnType, CtClass[] paramTypes) { in ofMethod()
314 public static String ofParameters(CtClass[] paramTypes) { in ofParameters()
368 public static String appendParameter(CtClass type, String descriptor) { in appendParameter()
389 public static String insertParameter(CtClass type, in insertParameter()
[all …]
/external/javassist/src/test/test/javassist/bytecode/analysis/
DScannerTest.java7 import javassist.CtClass;
28 CtClass clazz = pool.get("test.ScannerTest$GeneratedTest"); in testNestedFinally()
106 CtClass clazz = pool.makeClass("test.ScannerTest$GeneratedTest"); in generate()
107 … CtMethod method = new CtMethod(CtClass.voidType, "doit", new CtClass[] {CtClass.intType}, clazz); in generate()
110 CtClass stringClass = pool.get("java.lang.String"); in generate()
114 … /* 3 */ code.addInvokevirtual(clazz, "println", CtClass.voidType, new CtClass[] {stringClass}); in generate()
117 … /* 9 */ code.addInvokevirtual(clazz, "println", CtClass.voidType, new CtClass[] {stringClass}); in generate()
138 … /* 63 */ code.addInvokevirtual(clazz, "println", CtClass.voidType, new CtClass[] {stringClass}); in generate()
147 … /* 82 */ code.addInvokevirtual(clazz, "println", CtClass.voidType, new CtClass[] {stringClass}); in generate()
156 … /* 101 */ code.addInvokevirtual(clazz, "println", CtClass.voidType, new CtClass[] {stringClass}); in generate()
[all …]
DAnalyzerTest.java8 import javassist.CtClass;
30 CtClass clazz = pool.get(getClass().getName() + "$Dummy"); in testCommonSupperArray()
37 CtClass clazz = pool.get(getClass().getName() + "$Dummy"); in testCommonInterfaceArray()
112 private static void verifyArrayLoad(CtClass clazz, CtMethod method, String component) in verifyArrayLoad()
197 CtClass clazz = pool.makeClass(getClass().getName() + "$Generated0"); in generateDeadCode()
198 CtClass stringClass = pool.get("java.lang.String"); in generateDeadCode()
199 CtMethod method = new CtMethod(stringClass, "foo", new CtClass[0], clazz); in generateDeadCode()
207 … /* 6 */ code.addInvokestatic(stringClass, "valueOf", stringClass, new CtClass[]{CtClass.intType}); in generateDeadCode()
216 CtClass clazz = pool.makeClass(getClass().getName() + "$Generated4"); in generateInvalidCode()
217 CtClass intClass = pool.get("java.lang.Integer"); in generateInvalidCode()
[all …]
/external/javassist/src/main/javassist/expr/
DNewArray.java32 protected NewArray(int pos, CodeIterator i, CtClass declaring, in NewArray()
69 public CtClass[] mayThrow() { in mayThrow()
79 public CtClass getComponentType() throws NotFoundException { in getComponentType()
96 CtClass getPrimitiveType(int atype) { in getPrimitiveType()
99 return CtClass.booleanType; in getPrimitiveType()
101 return CtClass.charType; in getPrimitiveType()
103 return CtClass.floatType; in getPrimitiveType()
105 return CtClass.doubleType; in getPrimitiveType()
107 return CtClass.byteType; in getPrimitiveType()
109 return CtClass.shortType; in getPrimitiveType()
[all …]
DFieldAccess.java29 protected FieldAccess(int pos, CodeIterator i, CtClass declaring, in FieldAccess()
88 private CtClass getCtClass() throws NotFoundException { in getCtClass()
112 CtClass cc = getCtClass(); in getField()
122 public CtClass[] mayThrow() { in mayThrow()
158 CtClass[] params; in replace()
159 CtClass retType; in replace()
160 CtClass fieldType in replace()
165 params = new CtClass[0]; in replace()
169 params = new CtClass[1]; in replace()
171 retType = CtClass.voidType; in replace()
[all …]
DInstanceof.java30 protected Instanceof(int pos, CodeIterator i, CtClass declaring, in Instanceof()
66 public CtClass getType() throws NotFoundException { in getType()
80 public CtClass[] mayThrow() { in mayThrow()
103 CtClass[] params in replace()
104 = new CtClass[] { cp.get(javaLangObject) }; in replace()
105 CtClass retType = CtClass.booleanType; in replace()
159 gen.setType(CtClass.booleanType); in doit()
166 c.setType(CtClass.booleanType); in setReturnType()
DCast.java30 protected Cast(int pos, CodeIterator i, CtClass declaring, MethodInfo m) { in Cast()
63 public CtClass getType() throws NotFoundException { in getType()
77 public CtClass[] mayThrow() { in mayThrow()
100 CtClass[] params in replace()
101 = new CtClass[] { cp.get(javaLangObject) }; in replace()
102 CtClass retType = getType(); in replace()
137 CtClass retType;
139 ProceedForCast(int i, CtClass t) { in ProceedForCast()
/external/javassist/src/main/javassist/tools/rmi/
DStubGenerator.java53 private CtClass[] proxyConstructorParamTypes;
54 private CtClass[] interfacesForProxy;
55 private CtClass[] exceptionForProxy;
72 CtClass c = pool.get(sampleClass); in start()
83 = new CtClass[] { pool.get("javassist.tools.rmi.RemoteException") }; in start()
119 CtClass ctclazz = produceProxyClass(classPool.get(classname), in makeProxyClass()
127 private CtClass produceProxyClass(CtClass orgclass, Class orgRtClass) in produceProxyClass()
136 CtClass proxy = classPool.makeClass(orgclass.getName(), in produceProxyClass()
147 f = new CtField(CtClass.intType, fieldObjectId, proxy); in produceProxyClass()
168 private CtClass toCtClass(Class rtclass) throws NotFoundException { in toCtClass()
[all …]
/external/javassist/src/main/javassist/scopedpool/
DScopedClassPool.java24 import javassist.CtClass;
142 public synchronized void soften(CtClass clazz) { in soften()
165 protected CtClass getCached(String classname) { in getCached()
166 CtClass clazz = getCachedLocally(classname); in getCached()
221 protected void cacheCtClass(String classname, CtClass c, boolean dynamic) { in cacheCtClass()
238 public void lockInCache(CtClass c) { in lockInCache()
249 protected CtClass getCachedLocally(String classname) { in getCachedLocally()
250 CtClass cached = (CtClass)classes.get(classname); in getCachedLocally()
254 return (CtClass)softcache.get(classname); in getCachedLocally()
267 public synchronized CtClass getLocally(String classname) in getLocally()
[all …]
/external/javassist/src/main/javassist/tools/reflect/
DReflection.java78 protected CtClass[] readParam;
108 CtClass c = classPool.get("javassist.tools.reflect.Sample"); in start()
114 = new CtClass[] { classPool.get("java.lang.Object") }; in start()
128 CtClass clazz = pool.get(classname); in onLoad()
197 public boolean makeReflective(CtClass clazz, in makeReflective()
198 CtClass metaobject, CtClass metaclass) in makeReflective()
224 private void registerReflectiveClass(CtClass clazz) { in registerReflectiveClass()
237 private boolean modifyClassfile(CtClass clazz, CtClass metaobject, in modifyClassfile()
238 CtClass metaclass) in modifyClassfile()
246 CtClass mlevel = classPool.get("javassist.tools.reflect.Metalevel"); in modifyClassfile()
[all …]
/external/javassist/src/main/javassist/compiler/
DMemberResolver.java56 public CtClass declaring;
60 public Method(CtClass c, MethodInfo i, int n) { in Method()
75 public Method lookupMethod(CtClass clazz, CtClass currentClass, MethodInfo current, in lookupMethod()
104 private Method lookupMethod(CtClass clazz, String methodName, in lookupMethod()
142 CtClass pclazz = clazz.getSuperclass(); in lookupMethod()
155 CtClass[] ifs = clazz.getInterfaces(); in lookupMethod()
167 CtClass pclazz = clazz.getSuperclass(); in lookupMethod()
245 CtClass clazz = lookupClassByJvmName(argClassNames[n]); in compareSignature()
283 CtClass cc = null; in lookupFieldByJvmName2()
317 CtClass cc = lookupClass(className, false); in lookupField()
[all …]
DJvstCodeGen.java28 CtClass[] paramTypeList = null;
35 private CtClass dollarType = null;
36 CtClass returnType = null;
44 public JvstCodeGen(Bytecode b, CtClass cc, ClassPool cp) { in JvstCodeGen()
142 protected void atAssignParamList(CtClass[] params, Bytecode code) in atAssignParamList()
205 CtClass clazz = resolver.lookupClass(exprType, arrayDim, className); in atCastToWrapper()
336 CtClass[] params = paramTypeList; in atMethodArgs()
346 CtClass p = params[k]; in atMethodArgs()
414 if (result != null && returnType == CtClass.voidType) { in atReturnStmnt()
437 public int recordReturnType(CtClass type, String castName, in recordReturnType()
[all …]
/external/javassist/src/main/javassist/bytecode/annotation/
DAnnotation.java21 import javassist.CtClass;
98 public Annotation(ConstPool cp, CtClass clazz) in Annotation()
114 CtClass returnType = methods[i].getReturnType(); in Annotation()
129 public static MemberValue createMemberValue(ConstPool cp, CtClass type) in createMemberValue()
132 if (type == CtClass.booleanType) in createMemberValue()
134 else if (type == CtClass.byteType) in createMemberValue()
136 else if (type == CtClass.charType) in createMemberValue()
138 else if (type == CtClass.shortType) in createMemberValue()
140 else if (type == CtClass.intType) in createMemberValue()
142 else if (type == CtClass.longType) in createMemberValue()
[all …]
/external/android-mock/src/com/google/android/testing/mocking/
DAndroidMockGenerator.java21 import javassist.CtClass;
97 CtClass newInterfaceCtClass = generateInterface(clazz, sdkVersion); in createMocksForClass()
100 CtClass mockDelegateCtClass = generateSubClass(clazz, newInterfaceCtClass, sdkVersion); in createMocksForClass()
150 void saveCtClass(CtClass clazz) throws ClassNotFoundException, IOException { in saveCtClass()
161 CtClass generateInterface(Class<?> originalClass, SdkVersion sdkVersion) { in generateInterface()
166 CtClass newInterface = in generateInterface()
234 CtClass generateSubClass(Class<?> superClass, CtClass newInterface, SdkVersion sdkVersion) in generateSubClass()
244 CtClass newClass = generateSkeletalClass(superClass, newInterface, sdkVersion); in generateSubClass()
260 private void addConstructors(CtClass clazz, Class<?> superClass) throws ClassNotFoundException { in addConstructors()
261 CtClass superCtClass = getCtClassForClass(superClass); in addConstructors()
[all …]

1234