Package org.aspectj.weaver.tools

Examples of org.aspectj.weaver.tools.WeavingAdaptor$WeavingAdaptorMessageHolder


    if (trace.isTraceEnabled())
      trace.event("preProcess", this, new Object[] { loader.getParent(), Thread.currentThread().getContextClassLoader() });

    try {
      synchronized (loader) {
        WeavingAdaptor weavingAdaptor = WeaverContainer.getWeaver(loader, weavingContext);
        if (weavingAdaptor == null) {
          if (trace.isTraceEnabled())
            trace.exit("preProcess");
          return bytes;
        }
        byte[] newBytes = weavingAdaptor.weaveClass(className, bytes, false);
        Dump.dumpOnExit(weavingAdaptor.getMessageHolder(), true);
        if (trace.isTraceEnabled())
          trace.exit("preProcess", newBytes);
        return newBytes;
      }
View Full Code Here


    if (trace.isTraceEnabled())
      trace.event("preProcess", this, new Object[] { loader.getParent(), Thread.currentThread().getContextClassLoader() });

    try {
      synchronized (loader) {
        WeavingAdaptor weavingAdaptor = WeaverContainer.getWeaver(loader, weavingContext);
        if (weavingAdaptor == null) {
          if (trace.isTraceEnabled())
            trace.exit("preProcess");
          return bytes;
        }
        try {
          weavingAdaptor.setActiveProtectionDomain(protectionDomain);
          byte[] newBytes = weavingAdaptor.weaveClass(className, bytes, false);
          Dump.dumpOnExit(weavingAdaptor.getMessageHolder(), true);
          if (trace.isTraceEnabled())
            trace.exit("preProcess", newBytes);
          return newBytes;
        } finally {
          weavingAdaptor.setActiveProtectionDomain(null);
        }
      }

      /* Don't like to do this but JVMTI swallows all exceptions */
    } catch (Throwable th) {
View Full Code Here

    /*
     * If either we nor our parent is using an ASPECT_PATH use a new-style adaptor
     */
    if (this.aspectURLs.length > 0 || getParent() instanceof WeavingClassLoader) {
      try {
        adaptor = new WeavingAdaptor(this);
      } catch (ExceptionInInitializerError ex) {
        ex.printStackTrace(System.out);
        throw ex;
      }
    }
View Full Code Here

    /*
     * If either we nor our parent is using an ASPECT_PATH use a new-style adaptor
     */
    if (this.aspectURLs.length > 0 || getParent() instanceof WeavingClassLoader) {
      try {
        adaptor = new WeavingAdaptor(this);
      } catch (ExceptionInInitializerError ex) {
        ex.printStackTrace(System.out);
        throw ex;
      }
    }
View Full Code Here

            // skip boot loader or null classes (hibernate)
            return bytes;
        }

        try {
            WeavingAdaptor weavingAdaptor = WeaverContainer.getWeaver(loader, weavingContext);
            if (weavingAdaptor == null) {
              return bytes;
            }
            return weavingAdaptor.weaveClass(className, bytes);
        } catch (Throwable t) {
            //FIXME AV wondering if we should have the option to fail (throw runtime exception) here
            // would make sense at least in test f.e. see TestHelper.handleMessage()
            t.printStackTrace();
            return bytes;
View Full Code Here

   
    /* If either we nor our m_parent is using an ASPECT_PATH use a new-style
     * adaptor
     */
    if (this.aspectURLs.length > 0 || parent instanceof WeavingClassLoader) {
      adaptor = new WeavingAdaptor(this);
    }
  }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.tools.WeavingAdaptor$WeavingAdaptorMessageHolder

Copyright © 2018 www.massapicom. 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.