Package com.vladium.jcd.cls

Examples of com.vladium.jcd.cls.ClassDef


  }

  public byte[] instrument(String bundleid, String classname, byte[] bytes) {
    if (started) {
      try {
        ClassDef classdef = ClassDefParser.parseClass(bytes);
        InstrVisitor.InstrResult result = new InstrVisitor.InstrResult();
        new InstrVisitor(options).process(classdef, false, true, true,
            result);
        if (result.m_instrumented) {
          metadata.add(result.m_descriptor, true);
View Full Code Here


  public byte[] instrument(final String bundleid, final String classname,
      final byte[] bytes) {
    if (started) {
      try {
        final ClassDef classdef = ClassDefParser.parseClass(bytes);
        final InstrVisitor.InstrResult result = process(classdef, true);
        if (result.m_instrumented) {
          ByteArrayOutputStream out = new ByteArrayOutputStream(
              bytes.length * 2);
          ClassWriter.writeClassTable(classdef, out);
View Full Code Here

        + bundle.getSymbolicName());
    final Enumeration entries = bundle.findEntries("/", "*.class", true);
    while (entries != null && entries.hasMoreElements()) {
      final URL url = (URL) entries.nextElement();
      try {
        final ClassDef classdef = ClassDefParser.parseClass(url
            .openStream());
        if (!metadata.hasDescriptor(classdef.getName())) {
          process(classdef, false);
        }
      } catch (final IOException e) {
        System.err.println("Error while opening resource " + url
            + " in bundle " + bundle.getSymbolicName());
View Full Code Here

  public byte[] instrument(final String bundleid, final String classname,
      final byte[] bytes) {
    if (started) {
      try {
        final ClassDef classdef = ClassDefParser.parseClass(bytes);
        final InstrVisitor.InstrResult result = process(classdef, true);
        if (result.m_instrumented) {
          ByteArrayOutputStream out = new ByteArrayOutputStream(
              bytes.length * 2);
          ClassWriter.writeClassTable(classdef, out);
View Full Code Here

        + bundle.getSymbolicName());
    final Enumeration entries = bundle.findEntries("/", "*.class", true);
    while (entries != null && entries.hasMoreElements()) {
      final URL url = (URL) entries.nextElement();
      try {
        final ClassDef classdef = ClassDefParser.parseClass(url
            .openStream());
        if (!metadata.hasDescriptor(classdef.getName())) {
          process(classdef, false);
        }
      } catch (final IOException e) {
        System.err.println("Error while opening resource " + url
            + " in bundle " + bundle.getSymbolicName());
View Full Code Here

TOP

Related Classes of com.vladium.jcd.cls.ClassDef

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.