package org.seasar.framework.container.impl;

import java.util.ArrayList;
import java.util.List;

import org.seasar.framework.container.MetaDef;

/**
 * @author higa
 *
 */
public class MetaDefImpl extends ArgDefImpl implements MetaDef {

	private String name_;
	private List children_ = new ArrayList();
	
	public MetaDefImpl() {
	}
	
	public MetaDefImpl(String name) {
		name_ = name;
	}
		
	public MetaDefImpl(String name, Object value) {
		super(value);
		name_ = name;
	}
	
	/**
	 * @see org.seasar.framework.container.MetaDef#getName()
	 */
	public String getName() {
		return name_;
	}
	
	/**
	 * @see org.seasar.framework.container.MetaDef#addChild(org.seasar.framework.container.MetaDef)
	 */
	public void addChild(MetaDef metaDef) {
		children_.add(metaDef);

	}
	
	/**
	 * @see org.seasar.framework.container.MetaDef#getChild(int)
	 */
	public MetaDef getChild(int index) {
		return (MetaDef) children_.get(index);
	}
	
	/**
	 * @see org.seasar.framework.container.MetaDef#getChildSize()
	 */
	public int getChildSize() {
		return children_.size();
	}
}
