Ensures the {@link ModuleRegistry#init(ObjectMapper)}
has not yet been called.
169349
protected void checkState(InitializedState minState, InitializedState maxState) {
        PreconditionUtil.verify(initializedState.ordinal() >= minState.ordinal(), "not yet initialized, cannot yet be called");
        PreconditionUtil
                .verify(initializedState.ordinal() <= maxState.ordinal(), "already initialized, cannot be called anymore");
    }
1264763
private void initMapper() {
        final BeanPropertyFilter filterOutAllExcept =
                SimpleBeanPropertyFilter.filterOutAllExcept("fname", "executionTimeNano");
        this.mapper.addMixInAnnotations(
                PortalEvent.class, PortletRenderExecutionEventFilterMixIn.class);
        final SimpleFilterProvider filterProvider = new SimpleFilterProvider();
        filterProvider.addFilter(
                PortletRenderExecutionEventFilterMixIn.FILTER_NAME, filterOutAllExcept);
        this.portletEventWriter = this.mapper.writer(filterProvider);
    }
772304
private synchronized void defaultInit() 
    {
        if (!_initialized)
        {
            _initialized = true;
            String sinkClasses = System.getProperty("LOG_SINKS","org.browsermob.proxy.jetty.log.OutputStreamLogSink");
            StringTokenizer sinkTokens = new StringTokenizer(sinkClasses, ";, ");
                    
            LogSink sink= null;
            while (sinkTokens.hasMoreTokens())
            {
                String sinkClassName = sinkTokens.nextToken();
                    	
                try
                {
                    Class sinkClass = Loader.loadClass(this.getClass(),sinkClassName);
                    if (org.browsermob.proxy.jetty.log.LogSink.class.isAssignableFrom(sinkClass)) {
                        sink = (LogSink)sinkClass.newInstance();
                        sink.start();
                        add(sink);
                    }
                    else
                        // Can't use Code.fail here, that's what we're setting up
                        System.err.println(sinkClass+" is not a org.browsermob.proxy.jetty.log.LogSink");
                }
                catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    }
1124547
@Override
    public void chainInitialized(ChainData chainData) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "chainInitialized", chainData);

        chainState.set(ChainState.INITIALIZED.val);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "chainInitialized");
    }
1207955
public static boolean isAlreadyRegisteredIn(ObjectMapper mapper) {

		Assert.notNull(mapper, "ObjectMapper must not be null!");
		return LinkMixin.class.equals(mapper.findMixInClassFor(Link.class));
	}
575668
void initialized() {
    LOG.info("initialized with " + size() + " entries " + lookups + " lookups");
    this.initialized = true;
    transientMap.clear();
    transientMap = null;
  }
1271701
@Override
    public void initModule() throws ModuleInitializationException {
        Map<String, String> parameters = getParameters();
        copyPropertiesOverParameters(parameters);
        serverInterface = new ServerWrapper(getServer());
        logger.info("Journaling parameters: " + parameters);
        parseParameters(parameters);

        if (inRecoveryMode) {
            worker =
                    new JournalConsumer(parameters, getRole(), serverInterface);
        } else {
            worker = new JournalCreator(parameters, getRole(), serverInterface);
        }
        logger.info("Journal worker module is: " + worker.toString());
    }
21931
private void _initializeObjectMapper() {

		SimpleModule module = new SimpleModule();
		module.addSerializer(Alert.class, new Alert.Serializer());
		module.addSerializer(Trigger.class, new Trigger.Serializer());
		module.addSerializer(Notification.class, new Notification.Serializer());
		module.addSerializer(PrincipalUser.class, new Alert.PrincipalUserSerializer());
		module.addDeserializer(Alert.class, new Alert.Deserializer());

		_mapper.registerModule(module);
	}
1360220
private void storeMethod(Method method, Map<Key, Array> methodsMap) {
	Key methodName = KeyImpl.init(method.getName());

	Array methodArgs;
	synchronized (methodsMap) {
	    methodArgs = methodsMap.get(methodName);
	    if (methodArgs == null) {
		methodArgs = new ArrayImpl();
		methodsMap.put(methodName, methodArgs);
	    }
	}

	storeArgs(method, methodArgs);
	// Modifier.isStatic(method.getModifiers());
    }
589607
public void initialized(AppContextWrapper context) {
		ContainerRegistryBuilder cb = (ContainerRegistryBuilder) context.getAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME);
		if (cb != null)
			return;
		try {
			synchronized (context) {
				cb = containerBuilderContext.createContainerBuilder(context);
				context.setAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME, cb);
				Debug.logVerbose("[JdonFramework] Initialize the container OK ..");
			}
		} catch (Exception e) {
			Debug.logError("[JdonFramework] initialized error: " + e, module);
		}
	}
519730
private void initRepairingHandler(RepairingHandler handler) {
        logger.finest("Initializing repairing handler");

        boolean initialized = false;
        try {
            invalidationMetaDataFetcher.init(handler);
            initialized = true;
        } catch (Exception e) {
            logger.warning(e);
        } finally {
            if (!initialized) {
                initRepairingHandlerAsync(handler);
            }
        }
    }
641651
private void clearMappingRegistry(Object o, Class<?> clazz_AbstractHandlerMethodMapping) {
		if (debug) {
			System.out.println("SPRING_PLUGIN: clearing out mapping registry...");
		}
		Object mappingRegistryInstance = null;
		try {
			Field field_mappingRegistry = clazz_AbstractHandlerMethodMapping.getDeclaredField("mappingRegistry");
			field_mappingRegistry.setAccessible(true);
			mappingRegistryInstance = field_mappingRegistry.get(o);
		}
		catch (NoSuchFieldException e) {
			if (debug) {
				System.out.println(
						"SPRING_PLUGIN: Unable to get mappingRegistry field on AbstractHandlerMethodMapping");
			}
		}
		catch (IllegalAccessException e) {
			if (GlobalConfiguration.debugplugins || debug) {
				System.out.println(
						"SPRING_PLUGIN: Problem accessing mappingRegistry field on AbstractHandlerMethodMapping: ");
				e.printStackTrace(System.out);
			}
		}

		if (mappingRegistryInstance == null) {
			return;
		}
		Class mappingRegistryClass = mappingRegistryInstance.getClass();

		clearMapField(mappingRegistryClass, mappingRegistryInstance, "registry");
		clearMapField(mappingRegistryClass, mappingRegistryInstance, "mappingLookup");
		clearMapField(mappingRegistryClass, mappingRegistryInstance, "urlLookup");
		clearMapField(mappingRegistryClass, mappingRegistryInstance, "nameLookup");
		clearMapField(mappingRegistryClass, mappingRegistryInstance, "corsLookup");
		if (debug) {
			System.out.println("SPRING_PLUGIN: ... cleared out the mapping registry contents");
		}
	}
1240457
static void registerModule(final ObjectMapper objectMapper, final String className) {
        final Optional<Class<? extends Module>> moduleClass = getClass(className);
        if (moduleClass.isPresent()) {
            try {
                final Module module = moduleClass.get().newInstance();
                objectMapper.registerModule(module);
                // CHECKSTYLE.OFF: IllegalCatch - Catch any exceptions thrown by reflection or the module constructor.
            } catch (final Exception e) {
                // CHECKSTYLE.ON: IllegalCatch
                LOGGER.warn(
                        String.format(
                                "Unable to instantiate module; module=%s",
                                moduleClass.get()),
                        e);
            }
        }
    }
899991
private void initializeMapper() {
    if (itemClass == null) {
      itemMapper = CatchAllMapper.getInstance();
    } else {
      try {
        itemMapper = MapperFactory.getInstance().getMapper(itemClass);
      } catch (NoSuitableMapperException exp) {
        itemMapper = CatchAllMapper.getInstance();
      }
    }
  }
156145
public void initialise()
  {
    super.initialise();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "initialise");
      
    _deletedQueuePoints = new HashMap();

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "initialise");
  }
1282551
@SafeVarargs
    private final <O extends OperatorHelper> void initOperators(Map<Name, List<O>> opsMap, O... ops) {
        for (O o : ops) {
            Name opName = o.name;
            List<O> helpers = opsMap.getOrDefault(opName, List.nil());
            opsMap.put(opName, helpers.prepend(o));
        }
    }
356682
protected static void lazyInit() {
        // noinspection DoubleCheckedLocking
        if (instance == null) {
            try {
                STARTUP_LOCK.lockInterruptibly();
                try {
                    if (instance == null) {
                        instance = new ProviderUtil();
                    }
                } finally {
                    STARTUP_LOCK.unlock();
                }
            } catch (final InterruptedException e) {
                LOGGER.fatal("Interrupted before Log4j Providers could be loaded.", e);
                Thread.currentThread().interrupt();
            }
        }
    }