/** * Tells if this configurable object or its parent defines any custom formats. * * @since 2.3.24 */ public boolean hasCustomFormats() { return customNumberFormats != null && !customNumberFormats.isEmpty() || customDateFormats != null && !customDateFormats.isEmpty() || getParent() != null && getParent().hasCustomFormats(); }
private Configurable getScopeConfigurable(Environment env) throws Error { switch (scope) { case SCOPE_ENVIRONMENT: return env; case SCOPE_TEMPLATE: return env.getParent(); case SCOPE_CONFIGURATION: return env.getParent().getParent(); default: throw new BugException(); } }
/** * Tells if this configurable object or its parent defines any custom formats. * * @since 2.3.24 */ public boolean hasCustomFormats() { return customNumberFormats != null && !customNumberFormats.isEmpty() || customDateFormats != null && !customDateFormats.isEmpty() || getParent() != null && getParent().hasCustomFormats(); }
/** * Tells if this configurable object or its parent defines any custom formats. * * @since 2.3.24 */ public boolean hasCustomFormats() { return customNumberFormats != null && !customNumberFormats.isEmpty() || customDateFormats != null && !customDateFormats.isEmpty() || getParent() != null && getParent().hasCustomFormats(); }
private Configurable getScopeConfigurable() { Configurable c = Environment.getCurrentEnvironment(); if(c == null) { throw new IllegalStateException("No current environment"); } switch(scope) { case SCOPE_ENVIRONMENT: { return c; } case SCOPE_TEMPLATE: { return c.getParent(); } case SCOPE_CONFIGURATION: { return c.getParent().getParent(); } default: { throw new Error(); } } } }
private Configurable getScopeConfigurable(Environment env) throws Error { switch (scope) { case SCOPE_ENVIRONMENT: return env; case SCOPE_TEMPLATE: return env.getParent(); case SCOPE_CONFIGURATION: return env.getParent().getParent(); default: throw new BugException(); } }
private Configurable getScopeConfigurable(Environment env) throws Error { switch (scope) { case SCOPE_ENVIRONMENT: return env; case SCOPE_TEMPLATE: return env.getParent(); case SCOPE_CONFIGURATION: return env.getParent().getParent(); default: throw new BugException(); } }