01: package org.drools.eclipse.core;
02:
03: /**
04: * This represents a rule attribute.
05: *
06: * @author <a href="mailto:kris_verlaenen@hotmail.com">kris verlaenen </a>
07: */
08: public class RuleAttribute extends DroolsElement {
09:
10: private final String attributeName;
11: private final Object attributeValue;
12:
13: RuleAttribute(Rule parent, String attributeName,
14: Object attributeValue) {
15: super (parent);
16: this .attributeName = attributeName;
17: this .attributeValue = attributeValue;
18: }
19:
20: public Rule getParentRule() {
21: return (Rule) getParent();
22: }
23:
24: public String getAttributeName() {
25: return attributeName;
26: }
27:
28: public int getType() {
29: return RULE_ATTRIBUTE;
30: }
31:
32: public DroolsElement[] getChildren() {
33: return NO_ELEMENTS;
34: }
35:
36: public String toString() {
37: return attributeName + " = " + attributeValue;
38: }
39:
40: }
|