01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10:
11: package de.uka.ilkd.key.java;
12:
13: import de.uka.ilkd.key.java.annotation.Annotation;
14: import de.uka.ilkd.key.rule.MatchConditions;
15:
16: /**
17: * A part of the program syntax that carries semantics in the model.
18: * taken from COMPOST and changed to achieve an immutable structure
19: */
20: public interface ProgramElement extends SourceElement, ModelElement {
21:
22: /**
23: *Get comments.
24: *@return the comments.
25: */
26: Comment[] getComments();
27:
28: /**
29: *@return the annotations.
30: */
31: Annotation[] getAnnotations();
32:
33: int getAnnotationCount();
34:
35: /**
36: * matches the source "text" (@link SourceData#getSource()) against the pattern represented
37: * by this object. In case of a successful match the resulting {@link MatchConditions} with
38: * the found instantiations of the schemavariables. If the match
39: * failed, <tt>null</tt> is returned instead.
40: *
41: * @param source the SourceData with the program element to match
42: * @param matchCond the MatchConditions found up to this point
43: * @return the resulting match conditions or <tt>null</tt> if the match failed
44: */
45: MatchConditions match(SourceData source, MatchConditions matchCond);
46:
47: }
|