Created
December 19, 2012 20:49
-
-
Save etluchs/4340310 to your computer and use it in GitHub Desktop.
CDI profile enum
This file contains 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
public enum DbProfile { | |
IN_MEMORY_DB, JEE_DATASOURCE; | |
public AnnotationLiteral<InProfile> literal(){ | |
return new InProfileLiteral(); | |
} | |
class InProfileLiteral extends AnnotationLiteral<InProfile> implements InProfile { | |
@Override | |
public DbProfile value() { | |
return DbProfile.this; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment