Java 8 StandardLocation - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 StandardLocation class.

This code example shows how to use the following methods:ordinal
 * @run main T6418694 
 */ 
 
import javax.tools.StandardLocation;
 
public class T6418694 extends ToolTester { 
    void test(String... args) {
        for (StandardLocation loc : StandardLocation.values()) {
            switch (loc) {
            case CLASS_PATH:
            case SOURCE_PATH:
            case CLASS_OUTPUT:
            case PLATFORM_CLASS_PATH:
                if (!fm.hasLocation(loc))
                    throw new AssertionError("Missing location " + loc);
                break; 
            default: 
                if (fm.hasLocation(loc))
                    throw new AssertionError("Extra location " + loc);
                break; 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:equals
        default: 
          throw new UnsupportedOperationException("Unexpected kind " + kind);
      } 
      MemoryJavaFileObject toReturn =
          new MemoryJavaFileObject(uri("memory:///" + path + suffix), kind);
      if (StandardLocation.CLASS_OUTPUT.equals(location) && Kind.CLASS.equals(kind)) {
        toOutput.add(toReturn);
      } 
      return toReturn;
    } 
 
    @Override 
    public boolean isSameFile(FileObject a, FileObject b) {
      if (a instanceof MemoryJavaFileObject && b instanceof MemoryJavaFileObject) {
        MemoryJavaFileObject memoryA = (MemoryJavaFileObject) a;
        MemoryJavaFileObject memoryB = (MemoryJavaFileObject) b;
        return memoryA.getKind().equals(memoryB.getKind())
            && memoryA.toUri().equals(memoryB.toUri());
      } 
      if (a instanceof FakeJavaFileObject && b instanceof FakeJavaFileObject) {
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:ordinal
 * @run main T6418694 
 */ 
 
import javax.tools.StandardLocation;
 
public class T6418694 extends ToolTester { 
    void test(String... args) {
        for (StandardLocation loc : StandardLocation.values()) {
            switch (loc) {
            case CLASS_PATH:
            case SOURCE_PATH:
            case CLASS_OUTPUT:
            case PLATFORM_CLASS_PATH:
                if (!fm.hasLocation(loc))
                    throw new AssertionError("Missing location " + loc);
                break; 
            default: 
                if (fm.hasLocation(loc))
                    throw new AssertionError("Extra location " + loc);
                break; 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:equals
        default: 
          throw new UnsupportedOperationException("Unexpected kind " + kind);
      } 
      MemoryJavaFileObject toReturn =
          new MemoryJavaFileObject(uri("memory:///" + path + suffix), kind);
      if (StandardLocation.CLASS_OUTPUT.equals(location) && Kind.CLASS.equals(kind)) {
        toOutput.add(toReturn);
      } 
      return toReturn;
    } 
 
    @Override 
    public boolean isSameFile(FileObject a, FileObject b) {
      if (a instanceof MemoryJavaFileObject && b instanceof MemoryJavaFileObject) {
        MemoryJavaFileObject memoryA = (MemoryJavaFileObject) a;
        MemoryJavaFileObject memoryB = (MemoryJavaFileObject) b;
        return memoryA.getKind().equals(memoryB.getKind())
            && memoryA.toUri().equals(memoryB.toUri());
      } 
      if (a instanceof FakeJavaFileObject && b instanceof FakeJavaFileObject) {
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Java 8 StandardLocation Methods: