1 /******************************************************************************* 2 * Copyright (c) 2005, 2006 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.jdt.core; 12 13 /** 14 * A classpath attribute defines a name/value pair that can be persisted with a classpath entry. Such an attribute 15 * can be created using the factory method {@link JavaCore#newClasspathAttribute(String, String) newClasspathAttribute(String name, String value)}. 16 * <p> 17 * This interface is not intended to be implemented by clients. 18 * </p> 19 * 20 * @see JavaCore#newContainerEntry( 21 * org.eclipse.core.runtime.IPath containerPath, 22 * IAccessRule[] accessRules, 23 * IClasspathAttribute[] extraAttributes, 24 * boolean isExported) 25 * @see JavaCore#newLibraryEntry( 26 * org.eclipse.core.runtime.IPath path, 27 * org.eclipse.core.runtime.IPath sourceAttachmentPath, 28 * org.eclipse.core.runtime.IPath sourceAttachmentRootPath, 29 * IAccessRule[] accessRules, 30 * IClasspathAttribute[] extraAttributes, 31 * boolean isExported) 32 * @see JavaCore#newProjectEntry( 33 * org.eclipse.core.runtime.IPath path, 34 * IAccessRule[] accessRules, 35 * boolean combineAccessRestrictions, 36 * IClasspathAttribute[] extraAttributes, 37 * boolean isExported) 38 * @see JavaCore#newSourceEntry( 39 * org.eclipse.core.runtime.IPath path, 40 * org.eclipse.core.runtime.IPath[] inclusionPatterns, 41 * org.eclipse.core.runtime.IPath[] exclusionPatterns, 42 * org.eclipse.core.runtime.IPath specificOutputLocation, 43 * IClasspathAttribute[] extraAttributes) 44 * @see JavaCore#newVariableEntry( 45 * org.eclipse.core.runtime.IPath variablePath, 46 * org.eclipse.core.runtime.IPath variableSourceAttachmentPath, 47 * org.eclipse.core.runtime.IPath variableSourceAttachmentRootPath, 48 * IAccessRule[] accessRules, 49 * IClasspathAttribute[] extraAttributes, 50 * boolean isExported) 51 * @since 3.1 52 */ 53 public interface IClasspathAttribute { 54 55 /** 56 * Constant for the name of the javadoc location attribute. 57 * 58 * @since 3.1 59 */ 60 String JAVADOC_LOCATION_ATTRIBUTE_NAME = "javadoc_location"; //$NON-NLS-1$ 61 62 /** 63 * Constant for the name of the optional attribute. The possible values 64 * for this attribute are <code>"true"</code> or <code>"false"</code>. 65 * When not present, <code>"false"</code> is assumed. 66 * If the value of this attribute is <code>"true"</code>, the classpath entry 67 * is optional. If the underlying resource or jar file doesn't exist, no error 68 * is reported and the classpath entry is ignored. 69 * 70 * @since 3.2 71 */ 72 String OPTIONAL = "optional"; //$NON-NLS-1$ 73 74 /** 75 * Returns the name of this classpath attribute. 76 * 77 * @return the name of this classpath attribute. 78 * @since 3.1 79 */ 80 String getName(); 81 82 /** 83 * Returns the value of this classpath attribute. 84 * 85 * @return the value of this classpath attribute. 86 * @since 3.1 87 */ 88 String getValue(); 89 90 } 91