001: // This file is part of KeY - Integrated Deductive Software Design
002: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
003: // Universitaet Koblenz-Landau, Germany
004: // Chalmers University of Technology, Sweden
005: //
006: // The KeY system is protected by the GNU General Public License.
007: // See LICENSE.TXT for details.
008: //This file is part of KeY - Integrated Deductive Software Design
009: //Copyright (C) 2001-2003 Universitaet Karlsruhe, Germany
010: // and Chalmers University of Technology, Sweden
011: //
012: //The KeY system is protected by the GNU General Public License.
013: //See LICENSE.TXT for details.
014: //
015:
016: package de.uka.ilkd.key.rule.export;
017:
018: import de.uka.ilkd.key.logic.Name;
019: import de.uka.ilkd.key.logic.Named;
020: import de.uka.ilkd.key.rule.Taclet;
021:
022: public class TacletModelInfo implements Named {
023: private Taclet taclet;
024: private String filename;
025: private TacletModelInfo introducingTaclet = null;
026: private DisplayNameModelInfo displayName;
027: private ListOfOptionModelInfo options = SLListOfOptionModelInfo.EMPTY_LIST;
028: private ListOfRuleSetModelInfo ruleSets = SLListOfRuleSetModelInfo.EMPTY_LIST;
029:
030: public TacletModelInfo(Taclet taclet, String filename) {
031: this .taclet = taclet;
032: this .filename = filename;
033: }
034:
035: /**
036: * @return Returns the filename.
037: */
038: public String getFilename() {
039: return filename;
040: }
041:
042: /**
043: * @return Returns the taclet.
044: */
045: public Taclet getTaclet() {
046: return taclet;
047: }
048:
049: /**
050: * @return Returns the introducingTaclet.
051: */
052: public TacletModelInfo getIntroducingTaclet() {
053: return introducingTaclet;
054: }
055:
056: /**
057: * @param introducingTaclet The introducingTaclet to set.
058: */
059: public void setIntroducingTaclet(TacletModelInfo introducingTaclet) {
060: this .introducingTaclet = introducingTaclet;
061: }
062:
063: public Name name() {
064: return taclet.name();
065: }
066:
067: /**
068: * @return Returns the displayName.
069: */
070: public DisplayNameModelInfo getDisplayName() {
071: return displayName;
072: }
073:
074: /**
075: * @param displayName The displayName to set.
076: */
077: public void setDisplayName(DisplayNameModelInfo displayName) {
078: this .displayName = displayName;
079: }
080:
081: /**
082: * @return Returns the options.
083: */
084: public ListOfOptionModelInfo getOptions() {
085: return options;
086: }
087:
088: /**
089: * @param options The options to set.
090: */
091: public void setOptions(ListOfOptionModelInfo options) {
092: this .options = options;
093: }
094:
095: public void addOption(OptionModelInfo opt) {
096: if (!options.contains(opt)) {
097: options = options.prepend(opt);
098: }
099: }
100:
101: /**
102: * @return Returns the ruleSets.
103: */
104: public ListOfRuleSetModelInfo getRuleSets() {
105: return ruleSets;
106: }
107:
108: /**
109: * @param ruleSets The ruleSets to set.
110: */
111: public void setRuleSets(ListOfRuleSetModelInfo ruleSets) {
112: this .ruleSets = ruleSets;
113: }
114:
115: public void addRuleSet(RuleSetModelInfo ruleSet) {
116: if (!ruleSets.contains(ruleSet)) {
117: ruleSets = ruleSets.prepend(ruleSet);
118: }
119: }
120: }
|