KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > service > debug > DebugOptions


1 /*******************************************************************************
2  * Copyright (c) 2003, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.osgi.service.debug;
12
13 /**
14  * Used to get debug options settings.
15  * <p>
16  * This interface is not intended to be implemented by clients.
17  * </p>
18  * @since 3.1
19  */

20 public interface DebugOptions {
21
22     /**
23      * Returns the identified option as a boolean value. The specified
24      * defaultValue is returned if no such option is found. Options are specified
25      * in the general form <i>&lt;Bundle-SymbolicName&gt;/&lt;option-path&gt;</i>.
26      * For example, <code>org.eclipse.core.runtime/debug</code>
27      *
28      * @param option the name of the option to lookup
29      * @param defaultValue the value to return if no such option is found
30      * @return the value of the requested debug option or the
31      * defaultValue if no such option is found.
32      */

33     public boolean getBooleanOption(String JavaDoc option, boolean defaultValue);
34
35     /**
36      * Returns the identified option. <code>null</code>
37      * is returned if no such option is found. Options are specified
38      * in the general form <i>&lt;Bundle-SymbolicName&gt;/&lt;option-path&gt;</i>.
39      * For example, <code>org.eclipse.core.runtime/debug</code>
40      *
41      * @param option the name of the option to lookup
42      * @return the value of the requested debug option or <code>null</code>
43      */

44     public abstract String JavaDoc getOption(String JavaDoc option);
45
46     /**
47      * Returns the identified option. The specified defaultValue is
48      * returned if no such option is found or if a NumberFormatException is thrown
49      * while converting the option value to an integer. Options are specified
50      * in the general form <i>&lt;Bundle-SymbolicName&gt;/&lt;option-path&gt;</i>.
51      * For example, <code>org.eclipse.core.runtime/debug</code>
52      *
53      * @param option the name of the option to lookup
54      * @param defaultValue the value to return if no such option is found
55      * @return the value of the requested debug option or the
56      * defaultValue if no such option is found.
57      */

58     public abstract String JavaDoc getOption(String JavaDoc option, String JavaDoc defaultValue);
59
60     /**
61      * Returns the identified option as an int value. The specified
62      * defaultValue is returned if no such option is found. Options are specified
63      * in the general form <i>&lt;Bundle-SymbolicName&gt;/&lt;option-path&gt;</i>.
64      * For example, <code>org.eclipse.core.runtime/debug</code>
65      *
66      * @param option the name of the option to lookup
67      * @param defaultValue the value to return if no such option is found
68      * @return the value of the requested debug option or the
69      * defaultValue if no such option is found.
70      */

71     public abstract int getIntegerOption(String JavaDoc option, int defaultValue);
72
73     /**
74      * Sets the identified option to the identified value.
75      * @param option the name of the option to set
76      * @param value the value of the option to set
77      */

78     public abstract void setOption(String JavaDoc option, String JavaDoc value);
79 }
80
Popular Tags