FieldDeclaration getFieldDeclaration(VarSymbol v) {
        FieldDeclaration res = fieldDecls.get(v);
        if (res == null) {
            if (hasFlag(v, Flags.ENUM)) {
                res = new EnumConstantDeclarationImpl(env, v);
            } else {
                res = new FieldDeclarationImpl(env, v);
            }
            fieldDecls.put(v, res);
        }
        return res;
    }