sc.ldc("ISO-8859-1"); sc.invokevirtual(String.class.getName(), "getBytes", "(Ljava/lang/String;)[B"); sc.putstatic(file.getName(), state.fieldName, "[B"); BranchEnd end = sc.ifnull(); sc.checkcast(HTTP_STRING_CLASS); sc.putstatic(file.getName(), state.httpStringFieldName, HTTP_STRING_DESCRIPTOR); BranchEnd done = sc.gotoInstruction(); sc.branchEnd(end); sc.putstatic(file.getName(), state.httpStringFieldName, HTTP_STRING_DESCRIPTOR); sc.branchEnd(done);
init.putstatic(asm.getName(), strategyField, StubStrategy.class);
clinit.aastore(); clinit.putstatic(stubClassName, ID_FIELD_NAME, "[Ljava/lang/String;");
public void putstatic(String className, String field, Class<?> fieldType) { putstatic(className, field, DescriptorUtils.makeDescriptor(fieldType)); }
public void putstatic(String className, String field, Class<?> fieldType) { putstatic(className, field, DescriptorUtils.makeDescriptor(fieldType)); }
public void putstatic(String className, String field, Class<?> fieldType) { putstatic(className, field, DescriptorUtils.makeDescriptor(fieldType)); }
public void putstatic(String className, String field, Class<?> fieldType) { putstatic(className, field, DescriptorUtils.makeDescriptor(fieldType)); }
public void putstatic(String className, String field, Class<?> fieldType) { putstatic(className, field, DescriptorUtils.makeDescriptor(fieldType)); }
ca.ldc(i); ca.aaload(); ca.putstatic(getClassName(), METHOD_FIELD_PREFIX + i, METHOD_FIELD_DESCRIPTOR);
@Override public void getDeclaredMethod(final ClassMethod classMethod, final String declaringClass, final String methodName, final String[] parameterTypes, ClassMethod staticConstructor) { String weldMemberName = WELD_MEMBER_PREFIX + METHOD_COUNT.incrementAndGet(); staticConstructor.getClassFile().addField(AccessFlag.PRIVATE | AccessFlag.STATIC, weldMemberName, LJAVA_LANG_REFLECT_METHOD); final CodeAttribute code = staticConstructor.getCodeAttribute(); addInitMethod(declaringClass, methodName, parameterTypes, weldMemberName, staticConstructor.getClassFile()); code.invokestatic(staticConstructor.getClassFile().getName(), weldMemberName, "()Ljava/lang/reflect/Method;"); code.putstatic(classMethod.getClassFile().getName(), weldMemberName, LJAVA_LANG_REFLECT_METHOD); CodeAttribute methodCode = classMethod.getCodeAttribute(); methodCode.getstatic(classMethod.getClassFile().getName(), weldMemberName, LJAVA_LANG_REFLECT_METHOD); }
@Override public void getDeclaredMethod(final ClassMethod classMethod, final String declaringClass, final String methodName, final String[] parameterTypes, ClassMethod staticConstructor) { String weldMemberName = WELD_MEMBER_PREFIX + METHOD_COUNT.incrementAndGet(); staticConstructor.getClassFile().addField(AccessFlag.PRIVATE | AccessFlag.STATIC, weldMemberName, LJAVA_LANG_REFLECT_METHOD); final CodeAttribute code = staticConstructor.getCodeAttribute(); addInitMethod(declaringClass, methodName, parameterTypes, weldMemberName, staticConstructor.getClassFile()); code.invokestatic(staticConstructor.getClassFile().getName(), weldMemberName, "()Ljava/lang/reflect/Method;"); code.putstatic(classMethod.getClassFile().getName(), weldMemberName, LJAVA_LANG_REFLECT_METHOD); CodeAttribute methodCode = classMethod.getCodeAttribute(); methodCode.getstatic(classMethod.getClassFile().getName(), weldMemberName, LJAVA_LANG_REFLECT_METHOD); }
@Override public void getDeclaredMethod(final ClassMethod classMethod, final String declaringClass, final String methodName, final String[] parameterTypes, ClassMethod staticConstructor) { String weldMemberName = WELD_MEMBER_PREFIX + METHOD_COUNT.incrementAndGet(); staticConstructor.getClassFile().addField(AccessFlag.PRIVATE | AccessFlag.STATIC, weldMemberName, LJAVA_LANG_REFLECT_METHOD); final CodeAttribute code = staticConstructor.getCodeAttribute(); addInitMethod(declaringClass, methodName, parameterTypes, weldMemberName, staticConstructor.getClassFile()); code.invokestatic(staticConstructor.getClassFile().getName(), weldMemberName, "()Ljava/lang/reflect/Method;"); code.putstatic(classMethod.getClassFile().getName(), weldMemberName, LJAVA_LANG_REFLECT_METHOD); CodeAttribute methodCode = classMethod.getCodeAttribute(); methodCode.getstatic(classMethod.getClassFile().getName(), weldMemberName, LJAVA_LANG_REFLECT_METHOD); }
@Override public void getDeclaredMethod(final ClassMethod classMethod, final String declaringClass, final String methodName, final String[] parameterTypes, ClassMethod staticConstructor) { String weldMemberName = WELD_MEMBER_PREFIX + METHOD_COUNT.incrementAndGet(); staticConstructor.getClassFile().addField(AccessFlag.PRIVATE | AccessFlag.STATIC, weldMemberName, LJAVA_LANG_REFLECT_METHOD); final CodeAttribute code = staticConstructor.getCodeAttribute(); addInitMethod(declaringClass, methodName, parameterTypes, weldMemberName, staticConstructor.getClassFile()); code.invokestatic(staticConstructor.getClassFile().getName(), weldMemberName, "()Ljava/lang/reflect/Method;"); code.putstatic(classMethod.getClassFile().getName(), weldMemberName, LJAVA_LANG_REFLECT_METHOD); CodeAttribute methodCode = classMethod.getCodeAttribute(); methodCode.getstatic(classMethod.getClassFile().getName(), weldMemberName, LJAVA_LANG_REFLECT_METHOD); }
@Override public void getDeclaredMethod(final ClassMethod classMethod, final String declaringClass, final String methodName, final String[] parameterTypes, ClassMethod staticConstructor) { String weldMemberName = WELD_MEMBER_PREFIX + METHOD_COUNT.incrementAndGet(); staticConstructor.getClassFile().addField(AccessFlag.PRIVATE | AccessFlag.STATIC, weldMemberName, LJAVA_LANG_REFLECT_METHOD); final CodeAttribute code = staticConstructor.getCodeAttribute(); addInitMethod(declaringClass, methodName, parameterTypes, weldMemberName, staticConstructor.getClassFile()); code.invokestatic(staticConstructor.getClassFile().getName(), weldMemberName, "()Ljava/lang/reflect/Method;"); code.putstatic(classMethod.getClassFile().getName(), weldMemberName, LJAVA_LANG_REFLECT_METHOD); CodeAttribute methodCode = classMethod.getCodeAttribute(); methodCode.getstatic(classMethod.getClassFile().getName(), weldMemberName, LJAVA_LANG_REFLECT_METHOD); }
@Override public void getDeclaredMethod(final ClassMethod classMethod, final String declaringClass, final String methodName, final String[] parameterTypes, ClassMethod staticConstructor) { String weldMemberName = WELD_MEMBER_PREFIX + METHOD_COUNT.incrementAndGet(); staticConstructor.getClassFile().addField(AccessFlag.PRIVATE | AccessFlag.STATIC, weldMemberName, LJAVA_LANG_REFLECT_METHOD); final CodeAttribute code = staticConstructor.getCodeAttribute(); addInitMethod(declaringClass, methodName, parameterTypes, weldMemberName, staticConstructor.getClassFile()); code.invokestatic(staticConstructor.getClassFile().getName(), weldMemberName, "()Ljava/lang/reflect/Method;"); code.putstatic(classMethod.getClassFile().getName(), weldMemberName, LJAVA_LANG_REFLECT_METHOD); CodeAttribute methodCode = classMethod.getCodeAttribute(); methodCode.getstatic(classMethod.getClassFile().getName(), weldMemberName, LJAVA_LANG_REFLECT_METHOD); }
init.putstatic(asm.getName(), strategyField, StubStrategy.class);
clinit.aastore(); clinit.putstatic(stubClassName, ID_FIELD_NAME, "[Ljava/lang/String;");