01: ////////////////////////////////////////////////////////////////////////////////
02: // checkstyle: Checks Java source code for adherence to a set of rules.
03: // Copyright (C) 2001-2007 Oliver Burn
04: //
05: // This library is free software; you can redistribute it and/or
06: // modify it under the terms of the GNU Lesser General Public
07: // License as published by the Free Software Foundation; either
08: // version 2.1 of the License, or (at your option) any later version.
09: //
10: // This library is distributed in the hope that it will be useful,
11: // but WITHOUT ANY WARRANTY; without even the implied warranty of
12: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: // Lesser General Public License for more details.
14: //
15: // You should have received a copy of the GNU Lesser General Public
16: // License along with this library; if not, write to the Free Software
17: // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: ////////////////////////////////////////////////////////////////////////////////
19: package com.puppycrawl.tools.checkstyle.api;
20:
21: import java.io.Serializable;
22:
23: /**
24: * A Configuration is used to configure a Configurable component. The general
25: * idea of Configuration/Configurable was taken from <a target="_top"
26: * href="http://jakarta.apache.org/avalon/">Jakarta's Avalon framework</a>.
27: * @author lkuehne
28: */
29: public interface Configuration extends Serializable {
30: /**
31: * The set of attribute names.
32: * @return The set of attribute names, never null.
33: */
34: String[] getAttributeNames();
35:
36: /**
37: * The attribute value for an attribute name.
38: * @param aName the attribute name
39: * @return the value that is associated with aName
40: * @throws CheckstyleException if aName is not a valid attribute name
41: */
42: String getAttribute(String aName) throws CheckstyleException;
43:
44: /**
45: * The set of child configurations.
46: * @return The set of child configurations, never null.
47: */
48: Configuration[] getChildren();
49:
50: /**
51: * The name of this configuration.
52: * @return The name of this configuration.
53: */
54: String getName();
55: }
|