Examples of OSGiFriendlyClassWriter


Examples of org.apache.aries.proxy.impl.common.OSGiFriendlyClassWriter

   * @param loader
   * @param interfaces
   */
   InterfaceCombiningClassAdapter(String className,
      ClassLoader loader, Collection<Class<?>> interfaces) {
    writer = new OSGiFriendlyClassWriter(ClassWriter.COMPUTE_FRAMES, loader);
    adapter = new InterfaceUsingWovenProxyAdapter(writer, className, loader);
   
    this.interfaces = interfaces;
    String[] interfaceNames = new String[interfaces.size()];
   
View Full Code Here

Examples of org.apache.aries.proxy.impl.common.OSGiFriendlyClassWriter

    if((cReader.getAccess() & (ACC_INTERFACE | ACC_ANNOTATION | ACC_ENUM)) != 0)
      return null;
   
    //If we are Java 1.6 + compiled then we need to compute stack frames, otherwise
    //maxs are fine (and faster)
    ClassWriter cWriter = new OSGiFriendlyClassWriter(cReader, AbstractWovenProxyAdapter.IS_AT_LEAST_JAVA_6 ?
            ClassWriter.COMPUTE_FRAMES : ClassWriter.COMPUTE_MAXS, loader);
   
    //Wrap our outer layer to add the original SerialVersionUID if it was previously being defaulted
    ClassVisitor weavingAdapter = new SyntheticSerialVerUIDAdder(
                               new WovenProxyAdapter(cWriter, className, loader));
   
    // If we are Java 1.6 + then we need to skip frames as they will be recomputed
    cReader.accept(weavingAdapter, AbstractWovenProxyAdapter.IS_AT_LEAST_JAVA_6 ? ClassReader.SKIP_FRAMES : 0);
   
    return cWriter.toByteArray();
  }
View Full Code Here

Examples of org.apache.aries.proxy.impl.common.OSGiFriendlyClassWriter

   * @param interfaces
   */
  InterfaceCombiningClassAdapter(String className,
      ClassLoader loader, Class<?> superclass, Collection<Class<?>> interfaces) {
    super(Opcodes.ASM4);
    writer = new OSGiFriendlyClassWriter(ClassWriter.COMPUTE_FRAMES, loader);
    ClassVisitor cv = new OSGiFriendlyClassVisitor(writer, ClassWriter.COMPUTE_FRAMES);
    adapter = new InterfaceUsingWovenProxyAdapter(cv, className, loader);

    this.interfaces = interfaces;
    this.superclass = superclass;
View Full Code Here

Examples of org.apache.aries.proxy.impl.common.OSGiFriendlyClassWriter

   
    //If we are Java 1.6 + compiled then we need to compute stack frames, otherwise
    //maxs are fine (and faster)
    int computeVal = AbstractWovenProxyAdapter.IS_AT_LEAST_JAVA_6 ?
        ClassWriter.COMPUTE_FRAMES : ClassWriter.COMPUTE_MAXS;
    ClassWriter cWriter = new OSGiFriendlyClassWriter(cReader, computeVal, loader);
    ClassVisitor cv = new OSGiFriendlyClassVisitor(cWriter, computeVal );
    //Wrap our outer layer to add the original SerialVersionUID if it was previously being defaulted
    ClassVisitor weavingAdapter = new SyntheticSerialVerUIDAdder(
                               new WovenProxyAdapter(cv, cReader.getClassName(), loader));
   
    // If we are Java 1.6 + then we need to skip frames as they will be recomputed
    cReader.accept(weavingAdapter, AbstractWovenProxyAdapter.IS_AT_LEAST_JAVA_6 ? ClassReader.SKIP_FRAMES : 0);
   
    return cWriter.toByteArray();
  }
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.