01: /*
02: * Copyright (C) Chaperon. All rights reserved.
03: * -------------------------------------------------------------------------
04: * This software is published under the terms of the Apache Software License
05: * version 1.1, a copy of which has been included with this distribution in
06: * the LICENSE file.
07: */
08:
09: package net.sourceforge.chaperon.model.pattern;
10:
11: import net.sourceforge.chaperon.model.Violations;
12:
13: import java.io.Serializable;
14:
15: /**
16: * This represents the elements of a character class.
17: *
18: * @author <a href="mailto:stephan@apache.org">Stephan Michels</a>
19: * @version CVS $Id: CharacterClassElement.java,v 1.3 2003/12/09 19:55:52 benedikta Exp $
20: */
21: public interface CharacterClassElement extends Serializable, Cloneable {
22: /**
23: * Set the location from the input source.
24: *
25: * @param location Location in the input source.
26: */
27: public void setLocation(String location);
28:
29: /**
30: * Returns the location from the input source.
31: *
32: * @return Location in the input source.
33: */
34: public String getLocation();
35:
36: /**
37: * Create a clone of this pattern.
38: *
39: * @return Clone of this pattern.
40: *
41: * @throws CloneNotSupportedException If an exception occurs during the cloning.
42: */
43: public String toString();
44:
45: /**
46: * Validates this pattern.
47: *
48: * @return Return a list of violations, if this pattern isn't valid.
49: */
50: public Violations validate();
51: }
|