Test merge from helma_1_2_4 to check for keyword expansion problems
This commit is contained in:
parent
e646f24715
commit
df40e73b63
1 changed files with 33 additions and 24 deletions
|
@ -1,5 +1,18 @@
|
||||||
// SimplePathElement.java
|
/*
|
||||||
// Copyright Hannes Wallnöfer 2001
|
* Helma License Notice
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Helma License
|
||||||
|
* Version 2.0 (the "License"). You may not use this file except in
|
||||||
|
* compliance with the License. A copy of the License is available at
|
||||||
|
* http://adele.helma.org/download/helma/license.txt
|
||||||
|
*
|
||||||
|
* Copyright 1998-2003 Helma Software. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* $RCSfile$
|
||||||
|
* $Author$
|
||||||
|
* $Revision$
|
||||||
|
* $Date$
|
||||||
|
*/
|
||||||
|
|
||||||
package helma.framework.demo;
|
package helma.framework.demo;
|
||||||
|
|
||||||
|
@ -9,9 +22,7 @@ import helma.framework.IPathElement;
|
||||||
* This is an example implementation for the helma.framework.IPathElement interface.
|
* This is an example implementation for the helma.framework.IPathElement interface.
|
||||||
* It creates any child element which is requested on the fly without ever asking.
|
* It creates any child element which is requested on the fly without ever asking.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class SimplePathElement implements IPathElement {
|
public class SimplePathElement implements IPathElement {
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
String prototype;
|
String prototype;
|
||||||
IPathElement parent;
|
IPathElement parent;
|
||||||
|
@ -19,56 +30,54 @@ public class SimplePathElement implements IPathElement {
|
||||||
/**
|
/**
|
||||||
* Constructor for the root element.
|
* Constructor for the root element.
|
||||||
*/
|
*/
|
||||||
public SimplePathElement () {
|
public SimplePathElement() {
|
||||||
name = "root";
|
name = "root";
|
||||||
prototype = "root";
|
prototype = "root";
|
||||||
parent = null;
|
parent = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for non-root elements.
|
* Constructor for non-root elements.
|
||||||
*/
|
*/
|
||||||
public SimplePathElement (String n, IPathElement p) {
|
public SimplePathElement(String n, IPathElement p) {
|
||||||
name = n;
|
name = n;
|
||||||
prototype = "hopobject";
|
prototype = "hopobject";
|
||||||
parent = p;
|
parent = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a child element for this object, creating it on the fly.
|
* Returns a child element for this object, creating it on the fly.
|
||||||
*/
|
*/
|
||||||
public IPathElement getChildElement (String n) {
|
public IPathElement getChildElement(String n) {
|
||||||
return new SimplePathElement (n, this);
|
return new SimplePathElement(n, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns this object's parent element
|
* Returns this object's parent element
|
||||||
*/
|
*/
|
||||||
public IPathElement getParentElement () {
|
public IPathElement getParentElement() {
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the element name to be used for this object.
|
* Returns the element name to be used for this object.
|
||||||
*/
|
*/
|
||||||
public String getElementName () {
|
public String getElementName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the scripting prototype to be used for this object.
|
* Returns the name of the scripting prototype to be used for this object.
|
||||||
* This will be "root" for the root element and "hopobject for everything else.
|
* This will be "root" for the root element and "hopobject for everything else.
|
||||||
*/
|
*/
|
||||||
public String getPrototype () {
|
public String getPrototype() {
|
||||||
return prototype;
|
return prototype;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a string representation of this element.
|
* Returns a string representation of this element.
|
||||||
*/
|
*/
|
||||||
public String toString () {
|
public String toString() {
|
||||||
return "SimplePathElement "+name;
|
return "SimplePathElement " + name;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue