default EnumDeclaration asEnum(){
  throw new UnsupportedOperationException(String.format("%s is not an enum",this));
}

default EnumDeclaration asEnum ( ) { throw new UnsupportedOperationException ( String . format ( "%s is not an enum" , this ) ) ; }
return this as a enumdeclaration or throw unsupportedoperationexception .
