RngGrammar () { RngGrammar scope = myValue.getParentOfType(RngGrammar.class, true); if (scope == null) { return null; } if (myIsParentRef) { scope = scope.getParentOfType(RngGrammar.class, true); } return scope; }