Examples of begin_class()


Examples of net.sf.cglib.core.ClassEmitter.begin_class()

  public static Object buildInterfaceStub(final Class<?> clazz, ClassLoader classLoader) throws InstantiationException, IllegalAccessException {
    Enhancer enhancer = new Enhancer() {
      public void generateClass(ClassVisitor v) throws Exception {
        ClassEmitter ce = new ClassEmitter(v);
        ce.begin_class(Constants.V1_5,
            Constants.ACC_PUBLIC,
            getClassName(),
            null,
            new Type[]{Type.getType(clazz)},
            null);
View Full Code Here

Examples of net.sf.cglib.core.ClassEmitter.begin_class()

    if ((Modifier.ABSTRACT & clazz.getModifiers()) != 0) {
      Enhancer enhancer = new Enhancer() {
        @Override
        public void generateClass(ClassVisitor v) throws Exception {
          ClassEmitter ce = new ClassEmitter(v);
          ce.begin_class(Constants.V1_5,
              Constants.ACC_PUBLIC,
              getClassName(),
              Type.getType(clazz),
              null,
              null);
View Full Code Here

Examples of net.sf.cglib.core.ClassEmitter.begin_class()

/*  95 */     Type[] types = new Type[size];
/*  96 */     for (int i = 0; i < size; i++) {
/*  97 */       types[i] = ((Type)this.props.get(names[i]));
/*     */     }
/*  99 */     ClassEmitter ce = new ClassEmitter(v);
/* 100 */     ce.begin_class(46, 1, getClassName(), this.superclass != null ? Type.getType(this.superclass) : Constants.TYPE_OBJECT, null, null);
/*     */
/* 106 */     EmitUtils.null_constructor(ce);
/* 107 */     EmitUtils.add_properties(ce, names, types);
/* 108 */     ce.end_class();
/*     */   }
View Full Code Here

Examples of net.sf.cglib.core.ClassEmitter.begin_class()

/*     */
/*     */     public void generateClass(ClassVisitor v) {
/*  94 */       Type sourceType = Type.getType(this.source);
/*  95 */       Type targetType = Type.getType(this.target);
/*  96 */       ClassEmitter ce = new ClassEmitter(v);
/*  97 */       ce.begin_class(46, 1, getClassName(), BeanCopier.BEAN_COPIER, null, "<generated>");
/*     */
/* 104 */       EmitUtils.null_constructor(ce);
/* 105 */       CodeEmitter e = ce.begin_method(1, BeanCopier.COPY, null, null);
/* 106 */       PropertyDescriptor[] getters = ReflectUtils.getBeanGetters(this.source);
/* 107 */       PropertyDescriptor[] setters = ReflectUtils.getBeanGetters(this.target);
View Full Code Here

Examples of net.sf.cglib.core.ClassEmitter.begin_class()

/*  98 */     throw new IllegalStateException("InterfaceMaker does not cache");
/*     */   }
/*     */
/*     */   public void generateClass(ClassVisitor v) throws Exception {
/* 102 */     ClassEmitter ce = new ClassEmitter(v);
/* 103 */     ce.begin_class(46, 513, getClassName(), null, null, "<generated>");
/*     */
/* 109 */     for (Iterator it = this.signatures.keySet().iterator(); it.hasNext(); ) {
/* 110 */       Signature sig = (Signature)it.next();
/* 111 */       Type[] exceptions = (Type[])this.signatures.get(sig);
/* 112 */       ce.begin_method(1025, sig, exceptions, null).end_method();
View Full Code Here

Examples of net.sf.cglib.core.ClassEmitter.begin_class()

/*     */     }
/*     */
/*     */     public void generateClass(ClassVisitor v) {
/*  70 */       Type targetType = Type.getType(this.target);
/*  71 */       ClassEmitter ce = new ClassEmitter(v);
/*  72 */       ce.begin_class(46, 1, getClassName(), targetType, null, "<generated>");
/*     */
/*  79 */       ce.declare_field(18, "CGLIB$RWBean", targetType, null, null);
/*     */
/*  81 */       CodeEmitter e = ce.begin_method(1, ImmutableBean.CSTRUCT_OBJECT, null, null);
/*  82 */       e.load_this();
View Full Code Here

Examples of net.sf.cglib.core.ClassEmitter.begin_class()

/*      */         }
/*  469 */         return ReflectUtils.getMethodInfo(method, modifiers);
/*      */       }
/*      */     });
/*  473 */     ClassEmitter e = new ClassEmitter(v);
/*  474 */     e.begin_class(46, 1, getClassName(), Type.getType(sc), this.useFactory ? TypeUtils.add(TypeUtils.getTypes(this.interfaces), FACTORY) : TypeUtils.getTypes(this.interfaces), "<generated>");
/*      */
/*  482 */     List constructorInfo = CollectionUtils.transform(constructors, MethodInfoTransformer.getInstance());
/*      */
/*  484 */     e.declare_field(2, "CGLIB$BOUND", Type.BOOLEAN_TYPE, null, null);
/*  485 */     if (!this.interceptDuringConstruction) {
View Full Code Here

Examples of net.sf.cglib.core.ClassEmitter.begin_class()

/*     */         Constructor constructor;
/*  86 */         throw new IllegalArgumentException("interface does not match any known constructor");
/*     */       }
/*     */       Constructor constructor;
/*  89 */       ClassEmitter ce = new ClassEmitter(v);
/*  90 */       ce.begin_class(46, 1, getClassName(), CONSTRUCTOR_DELEGATE, new Type[] { Type.getType(this.iface) }, "<generated>");
/*     */
/*  96 */       Type declaring = Type.getType(constructor.getDeclaringClass());
/*  97 */       EmitUtils.null_constructor(ce);
/*  98 */       CodeEmitter e = ce.begin_method(1, ReflectUtils.getSignature(newInstance), ReflectUtils.getExceptionTypes(newInstance), null);
/*     */
View Full Code Here

Examples of net.sf.cglib.core.ClassEmitter.begin_class()

/*     */
/*     */     public void generateClass(ClassVisitor cv) {
/*  97 */       MethodInfo method = ReflectUtils.getMethodInfo(ReflectUtils.findInterfaceMethod(this.iface));
/*     */
/*  99 */       ClassEmitter ce = new ClassEmitter(cv);
/* 100 */       ce.begin_class(46, 1, getClassName(), MULTICAST_DELEGATE, new Type[] { Type.getType(this.iface) }, "<generated>");
/*     */
/* 106 */       EmitUtils.null_constructor(ce);
/*     */
/* 109 */       emitProxy(ce, method);
/*     */
View Full Code Here

Examples of net.sf.cglib.core.ClassEmitter.begin_class()

/* 211 */         throw new IllegalArgumentException("Static method " + (isStatic ? "not " : "") + "expected");
/*     */       }
/*     */
/* 214 */       ClassEmitter ce = new ClassEmitter(v);
/*     */
/* 216 */       ce.begin_class(46, 1, getClassName(), METHOD_DELEGATE, new Type[] { Type.getType(this.iface) }, "<generated>");
/*     */
/* 222 */       ce.declare_field(26, "eqMethod", Constants.TYPE_STRING, null, null);
/* 223 */       EmitUtils.null_constructor(ce);
/*     */
/* 226 */       MethodInfo proxied = ReflectUtils.getMethodInfo(this.iface.getDeclaredMethods()[0]);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.