/** * Adds a node to the list of children (really just a public wrapper around * addChild) * * @param child new child node */ public void addItem(NodeBase child) { addChild(child); }
/** * Adds a node to the list of children (really just a public wrapper around * addChild) * * @param child new child node */ public void addItem(NodeBase child) { addChild(child); }
public IDefinitionNode[] getDefinitions() { IDefinitionNode[] retVal = new IDefinitionNode[4]; VariableNode thisNode = new VariableNode(new IdentifierNode(IASKeywordConstants.THIS)); thisNode.setType(null, new IdentifierNode(IASLanguageConstants.Vector)); retVal[0] = thisNode; //and super VariableNode superNode = new VariableNode(new IdentifierNode(IASKeywordConstants.SUPER)); superNode.setType(null, new IdentifierNode(IASLanguageConstants.Object)); retVal[1] = superNode; //add the fixed getter/setter pair GetterNode fixGetter = new GetterNode(null, null, new IdentifierNode("fixed")); NamespaceIdentifierNode pub = new NamespaceIdentifierNode(INamespaceConstants.public_); pub.span(-1, -1, -1, -1); fixGetter.setNamespace(pub); fixGetter.setType(null, new IdentifierNode(IASLanguageConstants.Boolean)); retVal[2] = fixGetter; SetterNode fixSetter = new SetterNode(null, null, new IdentifierNode("fixed")); pub = new NamespaceIdentifierNode(INamespaceConstants.public_); pub.span(-1, -1, -1, -1); fixSetter.setNamespace(pub); fixSetter.setType(null, new IdentifierNode(IASLanguageConstants.void_)); ParameterNode value = new ParameterNode(new IdentifierNode("value")); value.setType(null, new IdentifierNode(IASLanguageConstants.Boolean)); fixSetter.getParametersContainerNode().addChild(value); retVal[3] = fixSetter; return retVal; }
public IDefinitionNode[] getDefinitions() { IDefinitionNode[] retVal = new IDefinitionNode[4]; VariableNode thisNode = new VariableNode(new IdentifierNode(IASKeywordConstants.THIS)); thisNode.setType(null, new IdentifierNode(IASLanguageConstants.Vector)); retVal[0] = thisNode; //and super VariableNode superNode = new VariableNode(new IdentifierNode(IASKeywordConstants.SUPER)); superNode.setType(null, new IdentifierNode(IASLanguageConstants.Object)); retVal[1] = superNode; //add the fixed getter/setter pair GetterNode fixGetter = new GetterNode(null, null, new IdentifierNode("fixed")); NamespaceIdentifierNode pub = new NamespaceIdentifierNode(INamespaceConstants.public_); pub.span(-1, -1, -1, -1); fixGetter.setNamespace(pub); fixGetter.setType(null, new IdentifierNode(IASLanguageConstants.Boolean)); retVal[2] = fixGetter; SetterNode fixSetter = new SetterNode(null, null, new IdentifierNode("fixed")); pub = new NamespaceIdentifierNode(INamespaceConstants.public_); pub.span(-1, -1, -1, -1); fixSetter.setNamespace(pub); fixSetter.setType(null, new IdentifierNode(IASLanguageConstants.void_)); ParameterNode value = new ParameterNode(new IdentifierNode("value")); value.setType(null, new IdentifierNode(IASLanguageConstants.Boolean)); fixSetter.getParametersContainerNode().addChild(value); retVal[3] = fixSetter; return retVal; }