ca.checkcast(returnType);
sc.dup(); BranchEnd end = sc.ifnull(); sc.checkcast(HTTP_STRING_CLASS); sc.putstatic(file.getName(), state.httpStringFieldName, HTTP_STRING_DESCRIPTOR); BranchEnd done = sc.gotoInstruction();
static public CodeAttribute unboxFloat(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "floatValue", "()F"); return bc; }
static public CodeAttribute unboxInt(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "intValue", "()I"); return bc; }
static public CodeAttribute unboxByte(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "byteValue", "()B"); return bc; }
static public CodeAttribute unboxByte(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "byteValue", "()B"); return bc; }
static public CodeAttribute unboxChar(CodeAttribute bc) { bc.checkcast("java.lang.Character"); bc.invokevirtual("java.lang.Character", "charValue", "()C"); return bc; }
static public CodeAttribute unboxByte(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "byteValue", "()B"); return bc; }
static public CodeAttribute unboxChar(CodeAttribute bc) { bc.checkcast("java.lang.Character"); bc.invokevirtual("java.lang.Character", "charValue", "()C"); return bc; }
static public CodeAttribute unboxLong(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "longValue", "()J"); return bc; }
static public CodeAttribute unboxChar(CodeAttribute bc) { bc.checkcast("java.lang.Character"); bc.invokevirtual("java.lang.Character", "charValue", "()C"); return bc; }
static public CodeAttribute unboxShort(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "shortValue", "()S"); return bc; }
static public CodeAttribute unboxFloat(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "floatValue", "()F"); return bc; }
static public CodeAttribute unboxDouble(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "doubleValue", "()D"); return bc; }
static public CodeAttribute unboxBoolean(CodeAttribute bc) { bc.checkcast("java.lang.Boolean"); bc.invokevirtual("java.lang.Boolean", "booleanValue", "()Z"); return bc; }
private void loadBeanInstance(ClassFile file, MethodInformation methodInfo, CodeAttribute b) { b.aload(0); getMethodHandlerField(file, b); // lets invoke the method b.invokevirtual(ProxyMethodHandler.class.getName(), "getInstance", EMPTY_PARENTHESES + LJAVA_LANG_OBJECT); b.checkcast(methodInfo.getDeclaringClass()); }
private void loadBeanInstance(ClassFile file, MethodInformation methodInfo, CodeAttribute b) { b.aload(0); getMethodHandlerField(file, b); // lets invoke the method b.invokevirtual(ProxyMethodHandler.class.getName(), "getInstance", EMPTY_PARENTHESES + LJAVA_LANG_OBJECT); b.checkcast(methodInfo.getDeclaringClass()); }
protected void generateSetMethodHandlerBody(ClassMethod method) { final CodeAttribute b = method.getCodeAttribute(); b.aload(0); b.aload(1); b.checkcast(getMethodHandlerType()); b.putfield(method.getClassFile().getName(), METHOD_HANDLER_FIELD_NAME, DescriptorUtils.makeDescriptor(getMethodHandlerType())); b.returnInstruction(); }
protected void generateSetMethodHandlerBody(ClassMethod method) { final CodeAttribute b = method.getCodeAttribute(); b.aload(0); b.aload(1); b.checkcast(getMethodHandlerType()); b.putfield(method.getClassFile().getName(), METHOD_HANDLER_FIELD_NAME, DescriptorUtils.makeDescriptor(getMethodHandlerType())); b.returnInstruction(); }
protected void generateSetMethodHandlerBody(ClassMethod method) { final CodeAttribute b = method.getCodeAttribute(); b.aload(0); b.aload(1); b.checkcast(getMethodHandlerType()); b.putfield(method.getClassFile().getName(), METHOD_HANDLER_FIELD_NAME, DescriptorUtils.makeDescriptor(getMethodHandlerType())); b.returnInstruction(); }