This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.lang.model
enum SourceVersion

java.lang.Object extended by java.lang.Enum extended by javax.lang.model.SourceVersion
All Implemented Interfaces:
Serializable, Comparable

public final enum SourceVersion
extends Enum

Source versions of the Java™ programming language. See http://java.sun.com/docs/books/jls/ for information on editions of The Java™ Language Specification, including updates and clarifications.

Note that additional source version constants will be added to model future releases of the language.


Field Summary
static SourceVersion RELEASE_0
          The original version.
static SourceVersion RELEASE_1
          The version recognized by the Java Platform 1.1.
static SourceVersion RELEASE_2
          The version recognized by the Java 2 Platform, Standard Edition, v 1.2.
static SourceVersion RELEASE_3
          The version recognized by the Java 2 Platform, Standard Edition, v 1.3.
static SourceVersion RELEASE_4
          The version recognized by the Java 2 Platform, Standard Edition, v 1.4.
static SourceVersion RELEASE_5
          The version recognized by the Java 2 Platform, Standard Edition 5.0.
static SourceVersion RELEASE_6
          The version recognized by the Java Platform, Standard Edition 6.
 
Method Summary
static boolean

          Returns whether or not is a syntactically valid identifier (simple name) or keyword in the latest source version.
static boolean

          Returns whether or not is a keyword or literal in the latest source version.
static boolean

          Returns whether or not is a syntactically valid qualified name in the latest source version.
static SourceVersion

          Returns the latest source version that can be modeled.
static SourceVersion

          Returns the latest source version fully supported by the current execution environment.
static SourceVersion

          
static SourceVersion[]

          
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RELEASE_0

public static final SourceVersion RELEASE_0
The original version. The language described in the first edition of The Java™ Language Specification.

RELEASE_1

public static final SourceVersion RELEASE_1
The version recognized by the Java Platform 1.1. The language is {@code RELEASE_0} augmented with nested classes.

RELEASE_2

public static final SourceVersion RELEASE_2
The version recognized by the Java 2 Platform, Standard Edition, v 1.2. The language described in The Java™ Language Specification, Second Edition, which includes the {@code strictfp} modifier.

RELEASE_3

public static final SourceVersion RELEASE_3
The version recognized by the Java 2 Platform, Standard Edition, v 1.3. No major changes from {@code RELEASE_2}.

RELEASE_4

public static final SourceVersion RELEASE_4
The version recognized by the Java 2 Platform, Standard Edition, v 1.4. Added a simple assertion facility.

RELEASE_5

public static final SourceVersion RELEASE_5
The version recognized by the Java 2 Platform, Standard Edition 5.0. The language described in The Java™ Language Specification, Third Edition. First release to support generics, annotations, autoboxing, var-args, enhanced {@code for} loop, and hexadecimal floating-point literals.

RELEASE_6

public static final SourceVersion RELEASE_6
The version recognized by the Java Platform, Standard Edition 6. No major changes from {@code RELEASE_5}.
Method Detail

isIdentifier

public static boolean isIdentifier(CharSequence name)
Returns whether or not {@code name} is a syntactically valid identifier (simple name) or keyword in the latest source version. The method returns {@code true} if the name consists of an initial character for which {@link Character#isJavaIdentifierStart(int)} returns {@code true}, followed only by characters for which {@link Character#isJavaIdentifierPart(int)} returns {@code true}. This pattern matches regular identifiers, keywords, and the literals {@code "true"}, {@code "false"}, and {@code "null"}. The method returns {@code false} for all other strings.

Parameters:
name - the string to check
Returns:
{@code true} if this string is a syntactically valid identifier or keyword, {@code false} otherwise.

isKeyword

public static boolean isKeyword(CharSequence s)
Returns whether or not {@code s} is a keyword or literal in the latest source version.

Parameters:
s - the string to check
Returns:
{@code true} if {@code s} is a keyword or literal, {@code false} otherwise.

isName

public static boolean isName(CharSequence name)
Returns whether or not {@code name} is a syntactically valid qualified name in the latest source version. Unlike {@link #isIdentifier isIdentifier}, this method returns {@code false} for keywords and literals.

Parameters:
name - the string to check
Returns:
{@code true} if this string is a syntactically valid name, {@code false} otherwise.

latest

public static SourceVersion latest()
Returns the latest source version that can be modeled.

Returns:
the latest source version that can be modeled

latestSupported

public static SourceVersion latestSupported()
Returns the latest source version fully supported by the current execution environment. {@code RELEASE_5} or later must be returned.

Returns:
the latest source version that is fully supported

valueOf

public static SourceVersion valueOf(String name)
Parameters:
name

values

public static SourceVersion[] values()


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.