package net.sourceforge.phpdt.internal.compiler.parser; import org.eclipse.jface.text.Position; /** * * @author khartlage */ public abstract class PHPSegment implements Outlineable { protected String name; private Position position; private Object parent; public PHPSegment(Object parent, String name, int index) { this.parent = parent; this.name = name; this.position = new Position(index, name.length()); } /** * Return the name of the segment. * @return the name of the segment */ public String getName() { return name; } public String toString() { return name; } public Position getPosition() { return position; } public Object getParent() { return parent; } };