MWriter.java :  » Net » hyperpool-0.4.0 » vicazh » hyperpool » Java Open Source

Java Open Source » Net » hyperpool 0.4.0 
hyperpool 0.4.0 » vicazh » hyperpool » MWriter.java
package vicazh.hyperpool;

import java.util.*;
import javax.xml.transform.*;

/**
 * The object mbean writer
 * 
 * @author Victor Zhigunov
 * @version 0.4.0
 */
public class MWriter extends Writer {
  private List<Integer> list;

  /**
   * @param tout
   *            xsl result transformer
   * @param list
   *            objects id list
   */
  public MWriter(String tout, List<Integer> list) throws TransformerException {
    super(tout);
    this.list = list;
  }

  ComData get() throws TransformerException {
    if (object == null)
      return null;
    ComData data = new ComData(get(object));
    data.objectID = new int[list.size()];
    for (int i = 0; i < data.objectID.length; i++) {
      data.objectID[i] = list.get(i);
      Start.logger.finest("objectID[" + i + "]=" + data.objectID[i]);
    }
    return data;
  }

  private Object object;

  /**
   * Set the object
   */
  public void setObject(Object object) {
    this.object = object;
  }

  /**
   * Get the object
   */
  public Object getObject() {
    return object;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.