package net.sourceforge.phpeclipse.phpeditor.phpparser;
import java.util.ArrayList;
import java.util.List;
import net.sourceforge.phpdt.internal.ui.PHPUiImages;
import org.eclipse.jface.resource.ImageDescriptor;
/**
*
* @author khartlage
*/
public class PHPClassDeclaration extends PHPSegment {
ArrayList fFunctions;
public PHPClassDeclaration(Object parent, String name, int index) {
super(parent, name, index);
fFunctions = new ArrayList();
}
public List getList( ) {
return fFunctions;
}
/**
* Appends the specified function declaration
*
* @param o function declaration to be appended to this list.
* @return true (as per the general contract of Collection.add).
*/
public boolean add(PHPSegment o) {
return fFunctions.add(o);
}
/**
* Returns the function declaration at the specified position in this list.
*
* @param index index of function declaration to return.
* @return the function declaration at the specified position in this list.
* @throws IndexOutOfBoundsException if index is out of range (index
* < 0 || index >= size()).
*/
public PHPSegment get(int index) {
return (PHPSegment) fFunctions.get(index);
}
/**
* Returns the number of declarations in this list.
*
* @return the number of declarations in this list.
*/
public int size() {
return fFunctions.size();
}
public ImageDescriptor getImage() {
return PHPUiImages.DESC_CLASS;
}
}