@Override public void addContext(Context context) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(context, "context"); Class<? extends Annotation> scope = context.getScope(); if (scope == null) { throw ContextLogger.LOG.contextHasNullScope(context); } if (!getBeanManager().isScope(scope)) { MetadataLogger.LOG.contextGetScopeIsNotAScope(scope, context); } if (scope == ApplicationScoped.class || scope == Dependent.class) { throw ContextLogger.LOG.cannotRegisterContext(scope, context); } getBeanManager().addContext(context); BootstrapLogger.LOG.addContext(getReceiver(), context); }
@Override public void addContext(Context context) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(context, "context"); Class<? extends Annotation> scope = context.getScope(); if (scope == null) { throw ContextLogger.LOG.contextHasNullScope(context); } if (!getBeanManager().isScope(scope)) { MetadataLogger.LOG.contextGetScopeIsNotAScope(scope, context); } if (scope == ApplicationScoped.class || scope == Dependent.class) { throw ContextLogger.LOG.cannotRegisterContext(scope, context); } getBeanManager().addContext(context); BootstrapLogger.LOG.addContext(getReceiver(), context); }
@Override public void addContext(Context context) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(context, "context"); Class<? extends Annotation> scope = context.getScope(); if (scope == null) { throw ContextLogger.LOG.contextHasNullScope(context); } if (!getBeanManager().isScope(scope)) { MetadataLogger.LOG.contextGetScopeIsNotAScope(scope, context); } if (scope == ApplicationScoped.class || scope == Dependent.class) { throw ContextLogger.LOG.cannotRegisterContext(scope, context); } getBeanManager().addContext(context); BootstrapLogger.LOG.addContext(getReceiver(), context); }
@Override public void addContext(Context context) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(context, "context"); Class<? extends Annotation> scope = context.getScope(); if (scope == null) { throw ContextLogger.LOG.contextHasNullScope(context); } if (!getBeanManager().isScope(scope)) { MetadataLogger.LOG.contextGetScopeIsNotAScope(scope, context); } if (scope == ApplicationScoped.class || scope == Dependent.class) { throw ContextLogger.LOG.cannotRegisterContext(scope, context); } getBeanManager().addContext(context); BootstrapLogger.LOG.addContext(getReceiver(), context); }
@Override public void addContext(Context context) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(context, "context"); Class<? extends Annotation> scope = context.getScope(); if (scope == null) { throw ContextLogger.LOG.contextHasNullScope(context); } if (!getBeanManager().isScope(scope)) { MetadataLogger.LOG.contextGetScopeIsNotAScope(scope, context); } if (scope == ApplicationScoped.class || scope == Dependent.class) { throw ContextLogger.LOG.cannotRegisterContext(scope, context); } getBeanManager().addContext(context); BootstrapLogger.LOG.addContext(getReceiver(), context); }
@Override public void addContext(Context context) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(context, "context"); Class<? extends Annotation> scope = context.getScope(); if (scope == null) { throw ContextLogger.LOG.contextHasNullScope(context); } if (!getBeanManager().isScope(scope)) { MetadataLogger.LOG.contextGetScopeIsNotAScope(scope, context); } if (scope == ApplicationScoped.class || scope == Dependent.class) { throw ContextLogger.LOG.cannotRegisterContext(scope, context); } getBeanManager().addContext(context); BootstrapLogger.LOG.addContext(getReceiver(), context); }