MLetObject.java :  » JMX » jfoxmx » org » huihoo » jfox » jmx » loading » Java Open Source

Java Open Source » JMX » jfoxmx 
jfoxmx » org » huihoo » jfox » jmx » loading » MLetObject.java
/* JFox, the OpenSource J2EE Application Server
 *
 * Copyright (C) 2002 huihoo.com
 * Distributable under GNU LGPL license
 * See the GNU Lesser General Public License for more details.
 */

package org.huihoo.jfox.jmx.loading;

/**
 * express a Mlet Tag Object which contains arguments and attributes
 *
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */

public class MLetObject {

  private MLetAttribute[] attrs;
  private MLetArgument[] args;

  public MLetObject(MLetAttribute[] attrs, MLetArgument[] args){
    this.attrs = attrs;
    this.args = args;
  }

  public String getAttribute(String name) {
    for(int i=0;i<attrs.length;i++){
      if(attrs[i].getName().equalsIgnoreCase(name)){
        return attrs[i].getValue();
      }
    }
    return null;
  }

  public MLetAttribute[] getAttributes() {
    return attrs;
  }

  public MLetArgument[] getArguments() {
    return args;
  }
}
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.