Created
January 11, 2012 06:15
-
-
Save shouichi/1593330 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run "make" to run on normal JVM, "make jpf" to run on JPF. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.EnumSet; | |
public class EnumTest { | |
enum Option { | |
A | |
} | |
public static void main(String[] args) { | |
EnumSet<Option> options = EnumSet.allOf(Option.class); | |
for (Option option : options) { | |
assert option != null; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum-test = ${config_path} | |
enum-test.classpath = ${config_path} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RM=rm -f | |
JAVAC=javac | |
JAVAC_FLAGS=-g | |
JAVA=java | |
JAVA_FLAGS=-ea | |
JPF=~/jpf/jpf-core/bin/jpf | |
SOURCES=EnumTest.java | |
CLASSES=$(SOURCES:.java=.class) | |
all: run | |
run: $(CLASSES) | |
$(JAVA) $(JAVA_FLAGS) `basename $< .class` | |
jpf: $(CLASSES) | |
$(JPF) `basename $< .class` | |
.SUFFIXES: | |
.SUFFIXES: .java .class | |
.java.class: | |
$(JAVAC) $(JAFAC_FLAG) $< | |
.PHONY: clean | |
clean: | |
$(RM) *.class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment