implemented IPathElement

This commit is contained in:
stefanp 2002-03-07 14:19:33 +00:00
parent 8bc447ad05
commit 0895856429

View file

@ -1,11 +1,12 @@
package helma.doc; package helma.doc;
import helma.framework.IPathElement;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import FESI.Parser.*; import FESI.Parser.*;
public class DocPrototype extends DocElement { public class DocPrototype extends DocElement implements IPathElement {
DocFunction[] functions; DocFunction[] functions;
DocApplication app; DocApplication app;
@ -188,5 +189,33 @@ public class DocPrototype extends DocElement {
return ( "[DocPrototype " + name + "]" ); return ( "[DocPrototype " + name + "]" );
} }
////////////////////////////////////
// from helma.framework.IPathElement
////////////////////////////////////
public String getElementName() {
return name;
}
public IPathElement getChildElement(String name) {
for ( int i=0; i<functions.length; i++ ) {
if ( name.equals( functions[i].getTypeName().toLowerCase()+"_"+functions[i].getName() ) )
return functions[i];
}
return null;
}
// return getFunction(name);
// }
public IPathElement getParentElement() {
return app;
}
public java.lang.String getPrototype() {
return "docprototype";
}
} }