Tabnine Logo
EnvUtil.isJUnitTest
Code IndexAdd Tabnine to your IDE (free)

How to use
isJUnitTest
method
in
org.jboss.errai.config.rebind.EnvUtil

Best Java code snippets using org.jboss.errai.config.rebind.EnvUtil.isJUnitTest (Showing top 9 results out of 315)

origin: errai/errai

public static boolean isProdMode() {
 if (_isProdMode != null) return _isProdMode;
 return _isProdMode = Boolean.valueOf(!isDevMode() && !isJUnitTest());
}
origin: org.jboss.errai/errai-config

public static boolean isProdMode() {
 if (_isProdMode != null) return _isProdMode;
 return _isProdMode = Boolean.valueOf(!isDevMode() && !isJUnitTest());
}
origin: errai/errai

private static void maybeLoadBootstrapClassCollection(final GeneratorContext context) {
 if (bootstrapClassCollection == null || EnvUtil.isJUnitTest()) {
  bootstrapClassCollection = ClassScanner.getTypesAnnotatedWith(IOCBootstrapTask.class, context);
 }
}
origin: errai/errai

private static void maybeLoadExtensionConfigurators(final MetaDataScanner scanner) {
 if (iocExtensions == null || extensionConfigurators == null || EnvUtil.isJUnitTest()) {
  iocExtensions = scanner
      .getTypesAnnotatedWith(org.jboss.errai.ioc.client.api.IOCExtension.class);
  extensionConfigurators = new ArrayList<IOCExtensionConfigurator>();
  try {
   for (final Class<?> clazz : iocExtensions) {
    final Class<? extends IOCExtensionConfigurator> configuratorClass
    = clazz.asSubclass(IOCExtensionConfigurator.class);
    final IOCExtensionConfigurator configurator = configuratorClass.newInstance();
    extensionConfigurators.add(configurator);
   }
  }
  catch (Exception e) {
   throw new ErraiBootstrapFailure("unable to load IOC Extension Configurator: " + e.getMessage(), e);
  }
 }
}
origin: errai/errai

public static void recordEnvironmentState() {
 isJUnitTest();
 isDevMode();
 isProdMode();
}
origin: org.jboss.errai/errai-config

public static void recordEnvironmentState() {
 isJUnitTest();
 isDevMode();
 isProdMode();
}
origin: org.jboss.errai/errai-marshalling

public static boolean isUseStaticMarshallers() {
 if (isForceStaticMarshallers())
  return true;
 if (EnvUtil.isDevMode() && !EnvUtil.isJUnitTest())
  return false;
 if (System.getProperty(USE_STATIC_MARSHALLERS) != null) {
  return Boolean.getBoolean(USE_STATIC_MARSHALLERS);
 }
 final Map<String, String> frameworkProperties = EnvUtil.getEnvironmentConfig().getFrameworkProperties();
 if (frameworkProperties.containsKey(USE_STATIC_MARSHALLERS)) {
  return "true".equals(frameworkProperties.get(USE_STATIC_MARSHALLERS));
 }
 else {
  return !EnvUtil.isDevMode();
 }
}
origin: errai/errai

@SuppressWarnings("rawtypes")
private static void maybeValidateDecorators(final MetaDataScanner scanner) {
 if (decoratorMap == null || EnvUtil.isJUnitTest()) {
  decoratorMap = new HashMap<Class<? extends IOCDecoratorExtension>, Class<? extends Annotation>>();
  final Set<Class<?>> decorators = scanner.getTypesAnnotatedWith(CodeDecorator.class);
  try {
   for (final Class<?> clazz : decorators) {
    final Class<? extends IOCDecoratorExtension> decoratorClass = clazz.asSubclass(IOCDecoratorExtension.class);
    Class<? extends Annotation> annoType = null;
    final Type t = decoratorClass.getGenericSuperclass();
    if (!(t instanceof ParameterizedType)) {
     throw new ErraiBootstrapFailure("code decorator must extend IOCDecoratorExtension<@AnnotationType>");
    }
    final ParameterizedType pType = (ParameterizedType) t;
    if (IOCDecoratorExtension.class.equals(pType.getRawType())) {
     if (pType.getActualTypeArguments().length == 0
         || !Annotation.class.isAssignableFrom((Class<?>) pType.getActualTypeArguments()[0])) {
      throw new ErraiBootstrapFailure("code decorator must extend IOCDecoratorExtension<@AnnotationType>");
     }
     // noinspection unchecked
     annoType = ((Class<?>) pType.getActualTypeArguments()[0]).asSubclass(Annotation.class);
    }
    decoratorMap.put(decoratorClass, annoType);
   }
  }
  catch (Exception e) {
   throw new ErraiBootstrapFailure("unable to load code decorator: " + e.getMessage(), e);
  }
 }
}
origin: errai/errai

public static boolean isUseStaticMarshallers() {
 if (isForceStaticMarshallers())
  return true;
 if (EnvUtil.isDevMode() && !EnvUtil.isJUnitTest())
  return false;
 if (System.getProperty(USE_STATIC_MARSHALLERS) != null) {
  return Boolean.getBoolean(USE_STATIC_MARSHALLERS);
 }
 final Map<String, String> frameworkProperties = EnvUtil.getEnvironmentConfig().getFrameworkProperties();
 if (frameworkProperties.containsKey(USE_STATIC_MARSHALLERS)) {
  return "true".equals(frameworkProperties.get(USE_STATIC_MARSHALLERS));
 }
 else {
  return !EnvUtil.isDevMode();
 }
}
org.jboss.errai.config.rebindEnvUtilisJUnitTest

Popular methods of EnvUtil

  • isPortableType
  • isProdMode
  • getEnvironmentConfig
  • getErraiAppPropertiesFilesUrls
  • isDevMode
  • isLocalEventType
  • recordEnvironmentState
  • addExposedInnerClasses
  • addMappingAliases
  • addNonSerializableTypes
  • addSerializableTypes
  • clearCache
  • addSerializableTypes,
  • clearCache,
  • fillInInterfacesAndSuperTypes,
  • getAllPortableConcreteSubtypes,
  • isBuiltinPortableType,
  • isListValuedProperty,
  • isString,
  • isUserPortableType,
  • processEnvironmentConfigExtensions

Popular in Java

  • Updating database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSystemService (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JButton (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now