implemented IPathElement
This commit is contained in:
parent
8bc447ad05
commit
0895856429
1 changed files with 30 additions and 1 deletions
|
@ -1,11 +1,12 @@
|
|||
package helma.doc;
|
||||
|
||||
import helma.framework.IPathElement;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import FESI.Parser.*;
|
||||
|
||||
|
||||
public class DocPrototype extends DocElement {
|
||||
public class DocPrototype extends DocElement implements IPathElement {
|
||||
|
||||
DocFunction[] functions;
|
||||
DocApplication app;
|
||||
|
@ -188,5 +189,33 @@ public class DocPrototype extends DocElement {
|
|||
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";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue