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

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

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

origin: org.jboss.errai/errai-marshalling

 @Override
 protected boolean isRelevantClass(final MetaClass clazz) {
  return EnvUtil.isPortableType(clazz);
 }
}
origin: errai/errai

 @Override
 protected boolean isRelevantClass(final MetaClass clazz) {
  return EnvUtil.isPortableType(clazz);
 }
}
origin: errai/errai

public static Set<Class<?>> getAllPortableConcreteSubtypes(final Class<?> clazz) {
 final Set<Class<?>> portableSubtypes = new HashSet<>();
 if (isPortableType(clazz)) {
  portableSubtypes.add(clazz);
 }
 for (final Class<?> subType : ScannerSingleton.getOrCreateInstance().getSubTypesOf(clazz)) {
  if (isPortableType(subType)) {
   portableSubtypes.add(subType);
  }
 }
 return portableSubtypes;
}
origin: errai/errai

public static Set<Class<?>> getAllPortableSubtypes(final Class<?> clazz) {
 final Set<Class<?>> portableSubtypes = new HashSet<>();
 if (clazz.isInterface() || isPortableType(clazz)) {
  portableSubtypes.add(clazz);
 }
 for (final Class<?> subType : ScannerSingleton.getOrCreateInstance().getSubTypesOf(clazz)) {
  if (clazz.isInterface() || isPortableType(subType)) {
   portableSubtypes.add(subType);
  }
 }
 return portableSubtypes;
}
origin: org.jboss.errai/errai-config

public static Set<Class<?>> getAllPortableConcreteSubtypes(final Class<?> clazz) {
 final Set<Class<?>> portableSubtypes = new HashSet<>();
 if (isPortableType(clazz)) {
  portableSubtypes.add(clazz);
 }
 for (final Class<?> subType : ScannerSingleton.getOrCreateInstance().getSubTypesOf(clazz)) {
  if (isPortableType(subType)) {
   portableSubtypes.add(subType);
  }
 }
 return portableSubtypes;
}
origin: org.jboss.errai/errai-weld-integration

 @SuppressWarnings("unused")
 private void onEvent(@Observes Object event, EventMetadata emd) {
  // Check if initialized
  if (eventDispatcher == null)
   return;

  // Check if the event is a portable Errai CDI event and should be forwarded
  // to all listening clients
  if (EnvUtil.isPortableType(event.getClass())) {
   eventDispatcher.sendEventToClients(event, emd);
  }

 }
}
origin: org.jboss.errai/errai-config

public static Set<Class<?>> getAllPortableSubtypes(final Class<?> clazz) {
 final Set<Class<?>> portableSubtypes = new HashSet<>();
 if (clazz.isInterface() || isPortableType(clazz)) {
  portableSubtypes.add(clazz);
 }
 for (final Class<?> subType : ScannerSingleton.getOrCreateInstance().getSubTypesOf(clazz)) {
  if (clazz.isInterface() || isPortableType(subType)) {
   portableSubtypes.add(subType);
  }
 }
 return portableSubtypes;
}
origin: dashbuilder/dashbuilder

  /**
   * <p>Return a <code>@Portable RuntimeException</code> that can be captured by client side widgets.</p>
   *  
   * @param e The exception that caused the error.
   * @return The portable exception to send to the client side.
   */
  public RuntimeException handleException(final Exception e) {
    log.error(e.getMessage(), e);
    if (e instanceof RuntimeException && EnvUtil.isPortableType(e.getClass()) ) {
      return (RuntimeException) e;
    }
    return new GenericPortableException( e.getMessage(), e );
  }
}
origin: org.dashbuilder/dashbuilder-dataset-cdi

  /**
   * <p>Return a <code>@Portable RuntimeException</code> that can be captured by client side widgets.</p>
   *  
   * @param e The exception that caused the error.
   * @return The portable exception to send to the client side.
   */
  public RuntimeException handleException(final Exception e) {
    log.error(e.getMessage(), e);
    if (e instanceof RuntimeException && EnvUtil.isPortableType(e.getClass()) ) {
      return (RuntimeException) e;
    }
    return new GenericPortableException( e.getMessage(), e );
  }
}
origin: org.kie.workbench.services/kie-wb-common-datamodel-backend

/**
 * Retrieve the value of an Annotation's attribute
 * @param annotation
 * @param attributeName
 * @return
 */
public static Object getAnnotationAttributeValue( final Annotation annotation,
                         final String attributeName ) {
  Object value = null;
  if ( annotation != null ) {
    try {
      value = annotation.annotationType().getMethod( attributeName ).invoke( annotation );
      final Class valueType = value.getClass();
      final Class componentType = valueType.getComponentType();
      final Class portableType = componentType != null ? componentType : valueType;
      if ( !EnvUtil.isPortableType( portableType ) ) {
        value = value.toString();
      }
    } catch ( Exception ex ) {
      //Swallow
    }
  }
  return value;
}
origin: org.guvnor/guvnor-services-api

  /**
   * Helper to return a @Portable RuntimeException.
   * @param e
   * @return
   */
  public static RuntimeException handleException(final Exception e) {
    logger.error("Exception thrown: " + e.getMessage(),
           e);
    if (EnvUtil.isPortableType(e.getClass())) {
      if (e instanceof RuntimeException) {
        return (RuntimeException) e;
      } else {
        return new GenericPortableException(e.getMessage(),
                          e);
      }
    }
    return new GenericPortableException(e.getMessage(),
                      e);
  }
}
origin: kiegroup/appformer

  /**
   * Helper to return a @Portable RuntimeException.
   * @param e
   * @return
   */
  public static RuntimeException handleException(final Exception e) {
    logger.error("Exception thrown: " + e.getMessage(),
           e);
    if (EnvUtil.isPortableType(e.getClass())) {
      if (e instanceof RuntimeException) {
        return (RuntimeException) e;
      } else {
        return new GenericPortableException(e.getMessage(),
                          e);
      }
    }
    return new GenericPortableException(e.getMessage(),
                      e);
  }
}
origin: org.uberfire/uberfire-services-api

  /**
   * Helper to return a @Portable RuntimeException.
   * @param e
   * @return
   */
  public static RuntimeException handleException(final Exception e) {
    logger.error("Exception thrown: " + e.getMessage(),
           e);
    if (EnvUtil.isPortableType(e.getClass())) {
      if (e instanceof RuntimeException) {
        return (RuntimeException) e;
      } else {
        return new GenericPortableException(e.getMessage(),
                          e);
      }
    }
    return new GenericPortableException(e.getMessage(),
                      e);
  }
}
origin: org.uberfire/uberfire-wires-bpmn-backend

  /**
   * Helper to return a @Portable RuntimeException.
   * @param e
   * @return
   */
  public static RuntimeException handleException(final Exception e) {
    logger.debug("Exception thrown: " + e.getMessage(),
           e);
    if (EnvUtil.isPortableType(e.getClass())) {
      if (e instanceof RuntimeException) {
        return (RuntimeException) e;
      } else {
        return new GenericPortableException(e.getMessage(),
                          e);
      }
    }
    return new GenericPortableException(e.getMessage(),
                      e);
  }
}
origin: kiegroup/appformer

  /**
   * Helper to return a @Portable RuntimeException.
   * @param e
   * @return
   */
  public static RuntimeException handleException(final Exception e) {
    logger.debug("Exception thrown: " + e.getMessage(),
           e);
    if (EnvUtil.isPortableType(e.getClass())) {
      if (e instanceof RuntimeException) {
        return (RuntimeException) e;
      } else {
        return new GenericPortableException(e.getMessage(),
                          e);
      }
    }
    return new GenericPortableException(e.getMessage(),
                      e);
  }
}
origin: org.jboss.errai/errai-weld-integration

@SuppressWarnings({ "unchecked", "rawtypes" })
public void processObserverMethod(@Observes final ProcessObserverMethod processObserverMethod) {
 final Type t = processObserverMethod.getObserverMethod().getObservedType();
 Class type = null;
 if (t instanceof Class) {
  type = (Class) t;
 }
 ClassScanner.setReflectionsScanning(true);
 if (type != null && EnvUtil.isPortableType(type) && !EnvUtil.isLocalEventType(type)) {
  final Set<Annotation> annotations = processObserverMethod.getObserverMethod().getObservedQualifiers();
  final Annotation[] methodQualifiers = annotations.toArray(new Annotation[annotations.size()]);
  for (final Annotation qualifier : methodQualifiers) {
   eventQualifiers.put(qualifier.annotationType().getName(), qualifier);
  }
  observableEvents.add(type.getName());
 }
}
origin: org.kie.workbench.forms/kie-wb-common-dynamic-forms-backend

if (EnvUtil.isPortableType(value.getClass())) {
  portableValue = value;
} else {
origin: org.jboss.errai/errai-weld-integration

if (type == null || !EnvUtil.isPortableType(type)) {
 log.warn("client tried to register a non-portable type: " + type);
 return;
origin: org.jboss.errai/errai-cdi-client

 callBackBlock = getJsTypeSubscriptionCallback(decorable, controller);
else if (EnvUtil.isPortableType(eventType) && !EnvUtil.isLocalEventType(eventType)) {
 subscribeMethod = "subscribe";
 callBackBlock = getSubscriptionCallback(decorable, controller);
org.jboss.errai.config.rebindEnvUtilisPortableType

Popular methods of EnvUtil

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

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • setScale (BigDecimal)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • From CI to AI: The AI layer in your organization
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