com.sun.tools.javac.code
Enum Source

java.lang.Object
  extended by java.lang.Enum<Source>
      extended by com.sun.tools.javac.code.Source
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Source>

public enum Source
extends java.lang.Enum<Source>

The source language version accepted.

This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.


Enum Constant Summary
JDK1_2
          1.2 introduced strictfp.
JDK1_3
          1.3 is the same language as 1.2.
JDK1_4
          1.4 introduced assert.
JDK1_5
          1.5 introduced generics, attributes, foreach, boxing, static import, covariant return, enums, varargs, et al.
JDK1_6
          1.6 reports encoding problems as errors instead of warnings.
JDK1_7
          1.7 covers the to be determined language features that will be added in JDK 7.
 
Field Summary
static Source DEFAULT
           
 java.lang.String name
           
private static Context.Key<Source> sourceKey
           
private static java.util.Map<java.lang.String,Source> tab
           
 
Method Summary
 boolean addBridges()
           
 boolean allowAnnotations()
           
 boolean allowAnonOuterThis()
           
 boolean allowAsserts()
           
 boolean allowBoxing()
           
 boolean allowCovariantReturns()
           
 boolean allowEncodingErrors()
          Allow encoding errors, giving only warnings.
 boolean allowEnums()
           
 boolean allowForeach()
           
 boolean allowGenerics()
           
 boolean allowHexFloats()
           
 boolean allowStaticImport()
           
 boolean allowVarargs()
           
 boolean enforceMandatoryWarnings()
           
static Source instance(Context context)
           
static Source lookup(java.lang.String name)
           
 Target requiredTarget()
           
static SourceVersion toSourceVersion(Source source)
           
static Source valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Source[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

JDK1_2

public static final Source JDK1_2
1.2 introduced strictfp.


JDK1_3

public static final Source JDK1_3
1.3 is the same language as 1.2.


JDK1_4

public static final Source JDK1_4
1.4 introduced assert.


JDK1_5

public static final Source JDK1_5
1.5 introduced generics, attributes, foreach, boxing, static import, covariant return, enums, varargs, et al.


JDK1_6

public static final Source JDK1_6
1.6 reports encoding problems as errors instead of warnings.


JDK1_7

public static final Source JDK1_7
1.7 covers the to be determined language features that will be added in JDK 7.

Field Detail

sourceKey

private static final Context.Key<Source> sourceKey

name

public final java.lang.String name

tab

private static java.util.Map<java.lang.String,Source> tab

DEFAULT

public static final Source DEFAULT
Method Detail

values

public static final Source[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Source c : Source.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Source valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

instance

public static Source instance(Context context)

lookup

public static Source lookup(java.lang.String name)

requiredTarget

public Target requiredTarget()

allowEncodingErrors

public boolean allowEncodingErrors()
Allow encoding errors, giving only warnings.


allowAsserts

public boolean allowAsserts()

allowCovariantReturns

public boolean allowCovariantReturns()

allowGenerics

public boolean allowGenerics()

allowEnums

public boolean allowEnums()

allowForeach

public boolean allowForeach()

allowStaticImport

public boolean allowStaticImport()

allowBoxing

public boolean allowBoxing()

allowVarargs

public boolean allowVarargs()

allowAnnotations

public boolean allowAnnotations()

allowHexFloats

public boolean allowHexFloats()

allowAnonOuterThis

public boolean allowAnonOuterThis()

addBridges

public boolean addBridges()

enforceMandatoryWarnings

public boolean enforceMandatoryWarnings()

toSourceVersion

public static SourceVersion toSourceVersion(Source source)