Example usage for org.eclipse.jdt.internal.compiler.classfmt ClassFileConstants MAJOR_VERSION_1_7

List of usage examples for org.eclipse.jdt.internal.compiler.classfmt ClassFileConstants MAJOR_VERSION_1_7

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.classfmt ClassFileConstants MAJOR_VERSION_1_7.

Prototype

int MAJOR_VERSION_1_7

To view the source code for org.eclipse.jdt.internal.compiler.classfmt ClassFileConstants MAJOR_VERSION_1_7.

Click Source Link

Usage

From source file:org.eclipse.xtext.xbase.compiler.InMemoryJavaCompiler.java

License:Open Source License

private long toClassFmt(final JavaVersion version) {
    if (version != null) {
        switch (version) {
        case JAVA5:
            return ClassFileConstants.JDK1_5;
        case JAVA6:
            return ClassFileConstants.JDK1_6;
        case JAVA7:
            return ClassFileConstants.JDK1_7;
        case JAVA8:
            return (((ClassFileConstants.MAJOR_VERSION_1_7 + 1) << 16) + ClassFileConstants.MINOR_VERSION_0);
        default:/*ww  w  .j  a  va 2 s .c  o  m*/
            break;
        }
    }
    return 0;
}