Package java.util

Examples of java.util.PropertyResourceBundle.keySet()


        inputStream = url.openStream();

        final ResourceBundle props = new PropertyResourceBundle(inputStream);
        if (props != null) {

          for (final Object o : props.keySet()) {
            final String key = (String) o;

            frameworkProps.put(key, props.getString(key));

            if (key.equals(CONFIG_ERRAI_SERIALIZABLE_TYPE)) {
View Full Code Here


      try {
        log.debug("Checking " + url.getFile() + " for bindable types...");
        inputStream = url.openStream();

        final ResourceBundle props = new PropertyResourceBundle(inputStream);
        for (final String key : props.keySet()) {
          if (key.equals("errai.ui.bindableTypes")) {
            for (final String s : props.getString(key).split(" ")) {
              try {
                bindableTypes.add(MetaClassFactory.get(s.trim()));
              } catch (Exception e) {
View Full Code Here

        inputStream = url.openStream();

        ResourceBundle props = new PropertyResourceBundle(inputStream);
        if (props != null) {

          for (Object o : props.keySet()) {
            String key = (String) o;
            if (key.equals(CONFIG_ERRAI_SERIALIZABLE_TYPE)) {
              for (String s : props.getString(key).split(" ")) {
                try {
                  Class<?> cls = Class.forName(s.trim());
View Full Code Here

        inputStream = url.openStream();

        final ResourceBundle props = new PropertyResourceBundle(inputStream);
        if (props != null) {

          for (final Object o : props.keySet()) {
            final String key = (String) o;

            frameworkProps.put(key, props.getString(key));

            if (key.equals(CONFIG_ERRAI_SERIALIZABLE_TYPE)) {
View Full Code Here

        inputStream = url.openStream();

        final ResourceBundle props = new PropertyResourceBundle(inputStream);
        if (props != null) {

          for (final Object o : props.keySet()) {
            final String key = (String) o;

            if (key.equals(EXTENSION_KEY)) {
              final String clsName = props.getString(key);
              try {
View Full Code Here

    PropertyResourceBundle bundle = new PropertyResourceBundle(
        createPropertyFileReader());

    StringBuilder resultText = new StringBuilder(
        "The resource bundle contains the keys \n");
    resultText.append(bundle.keySet());

    // the bundleName should be the real name of the bundle
    String bundleName = "testbundle";
    String prefixOfConstants = PREFIX;
    StringBuilder sourcecode = new StringBuilder();
View Full Code Here

 
  @Test
  public void testToMap()throws Exception{
    PropertyResourceBundle bundle = new PropertyResourceBundle(ObjectAnalyzingCodeGeneratorTest.createPropertyFileReader());
    Map map = StaticUtilityMethods.toMap(bundle);
    Set<String>keys = bundle.keySet();
    Assert.assertEquals(keys.size(), map.size());
    for (String key: keys)
      Assert.assertEquals(bundle.getObject(key), map.get(key));
   
  }
View Full Code Here

  @Test
  public void testToMap() throws Exception {
    PropertyResourceBundle bundle = new PropertyResourceBundle(
        ObjectAnalyzingCodeGeneratorTest.createPropertyFileReader());
    Map map = ContainerBoostUtils.toMap(bundle);
    Set<String> keys = bundle.keySet();
    Assert.assertEquals(keys.size(), map.size());
    for (String key : keys)
      Assert.assertEquals(bundle.getObject(key), map.get(key));

  }
View Full Code Here

        inputStream = url.openStream();

        final ResourceBundle props = new PropertyResourceBundle(inputStream);
        if (props != null) {

          for (final Object o : props.keySet()) {
            final String key = (String) o;

            if (key.equals(EXTENSION_KEY)) {
              final String clsName = props.getString(key);
              try {
View Full Code Here

        final URL url = erraiAppProperties.nextElement();
        log.debug("Checking " + url.getFile() + " for bindable types...");
        inputStream = url.openStream();

        final ResourceBundle props = new PropertyResourceBundle(inputStream);
        for (final String key : props.keySet()) {
          if (key.equals("errai.ui.bindableTypes")) {
            for (final String s : props.getString(key).split(" ")) {
              try {
                bindableTypes.add(MetaClassFactory.get(s.trim()));
              }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.