congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
PrimitiveOrEnumTypeConverter
Code IndexAdd Tabnine to your IDE (free)

How to use
PrimitiveOrEnumTypeConverter
in
org.chorusbdd.chorus.handlerconfig.configproperty

Best Java code snippets using org.chorusbdd.chorus.handlerconfig.configproperty.PrimitiveOrEnumTypeConverter (Showing top 2 results out of 315)

origin: Chorus-bdd/Chorus

@Override
public Object convertToTargetType(String propertyValue, Class targetClass) throws ConfigBuilderException {
  return  targetClass == String.class ? 
    propertyValue : 
    mapToEnumOrPrimitiveWrapper(propertyValue, targetClass);
}
origin: Chorus-bdd/Chorus

private Object mapToEnumOrPrimitiveWrapper(String propertyValue, Class targetClass) throws ConfigBuilderException {
  Object result;
  try {
    if ( targetClass.isEnum()) {
      result = mapToEnum(propertyValue, targetClass);
    } else {
      result = mapToPrimitiveWrapper(propertyValue, targetClass);
    }
  } catch (NumberFormatException nfe) {
    throw new ConfigBuilderException(getClass().getSimpleName() +  " could not convert the property value '" +
      propertyValue + "' to a " + targetClass.getName());
  }
  return result;
}
org.chorusbdd.chorus.handlerconfig.configpropertyPrimitiveOrEnumTypeConverter

Javadoc

Convert a String property value to an instance of a target primitive type wrapper class

Most used methods

  • mapToEnum
  • mapToEnumOrPrimitiveWrapper
  • mapToPrimitiveWrapper

Popular in Java

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for WebStorm
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