Package javax.lang.model

Examples of javax.lang.model.SourceVersion.ordinal()


  @Override
  public SourceVersion getSupportedSourceVersion() {
    SourceVersion latestSupported = SourceVersion.latestSupported();

    if (latestSupported.ordinal() <= 6) {
      return SourceVersion.RELEASE_6;
    }
    else if (latestSupported.ordinal() <= 8) {
      return latestSupported;
    }
View Full Code Here


    SourceVersion latestSupported = SourceVersion.latestSupported();

    if (latestSupported.ordinal() <= 6) {
      return SourceVersion.RELEASE_6;
    }
    else if (latestSupported.ordinal() <= 8) {
      return latestSupported;
    }
    else {
      // this annotation processor is tested through Java 8
      return SourceVersion.values()[8];
View Full Code Here

        // support version 6 or 7
        // we can't compile against RELEASE_7 and maintain Java 6 compatibility, but the
        // processor is Java 7-compatible. We have not tested against Java 8, however.
        SourceVersion[] versions = SourceVersion.values();
        SourceVersion v6 = SourceVersion.RELEASE_6;
        assert v6.ordinal() < versions.length;
        // we support up through Java 8
        return versions[Math.min(v6.ordinal() + 2, versions.length - 1)];
    }

    private Messager getLog() {
View Full Code Here

        // processor is Java 7-compatible. We have not tested against Java 8, however.
        SourceVersion[] versions = SourceVersion.values();
        SourceVersion v6 = SourceVersion.RELEASE_6;
        assert v6.ordinal() < versions.length;
        // we support up through Java 8
        return versions[Math.min(v6.ordinal() + 2, versions.length - 1)];
    }

    private Messager getLog() {
        return processingEnv.getMessager();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.