BaseContext (Context context) { switch (context) { case FILE: return BaseContext.FILE; case CLASS: return BaseContext.CLASS; case CODE_BLOCK: return BaseContext.CODE_BLOCK; case ANNOTATION_INTERFACE: return BaseContext.ANNOTATION_INTERFACE; default: throw new UnsupportedOperationException(); } }