All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.core.runtime.content.ITextContentDescriber Maven / Gradle / Ivy

Go to download

AspectJ tools most notably contains the AspectJ compiler (AJC). AJC applies aspects to Java classes during compilation, fully replacing Javac for plain Java classes and also compiling native AspectJ or annotation-based @AspectJ syntax. Furthermore, AJC can weave aspects into existing class files in a post-compile binary weaving step. This library is a superset of AspectJ weaver and hence also of AspectJ runtime.

There is a newer version: 1.9.22.1
Show newest version
/*******************************************************************************
 * Copyright (c) 2004, 2005 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.core.runtime.content;

import java.io.IOException;
import java.io.Reader;

/**
 * Text content describers extend basic content describers to provide
 * the ability of scanning character streams (readers). Describers for
 * text-based content types must implement this interface
 * instead of IContentDescription.
 * 

* Note: It is expected that content describer implementations be declared in a package * that is exempt from plug-in activation (using the Eclipse-AutoStart bundle * manifest header). Since all describers are instantiated when the content type * framework is initialized, failure in complying with this requirement causes * premature activation, which must be avoided. Future implementations of the * framework might refuse to instantiate describers if doing so would trigger * activation of the corresponding plug-in. *

*

* Clients may implement this interface. *

* * @see IContentDescription * @since 3.0 */ public interface ITextContentDescriber extends IContentDescriber { /** * Tries to fill a description for the given contents. Returns * an int indicating whether the given stream of * characters represents a valid sample for this describer's corresponding * content type. If no content description is provided, this method should * only perform content type validation. *

* The stream provided must be kept open, and any IOExceptions while * reading it should flow to the caller. *

* * @param contents the contents to be examined * @param description a description to be filled in, or null if * only content type validation is to be performed * @return one of the following:
    *
  • VALID
  • *
  • INVALID
  • *
  • INDETERMINATE
  • *
* @throws IOException if an I/O error occurs * @see IContentDescription * @see #VALID * @see #INVALID * @see #INDETERMINATE */ int describe(Reader contents, IContentDescription description) throws IOException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy