Package com.google.inject.spi

Examples of com.google.inject.spi.Message


        monitor.onError(message);
    }

    public void addError(Throwable e, String format, Object... params)
    {
        Message message = new Message(emptyList(), "Error: " + format(format, params), e);
        errors.add(message);
        monitor.onError(message);
    }
View Full Code Here


        return ImmutableList.copyOf(warnings);
    }

    public void addWarning(String format, Object... params)
    {
        Message message = new Message("Warning: " + format(format, params));
        warnings.add(message);
        monitor.onWarning(message);
    }
View Full Code Here

            overridePropertyValuesWithSystemProperties(initProperties, overridableProperties());
            replacePlaceholderWithValue(initProperties, "%contextRoot%", getContextRootValue(initProperties));
            return initProperties;
        } catch (IOException e) {
            throw new CreationException(Arrays.asList(
                    new Message("Unable to load properties from resource"
                            + ". " + e.getMessage())
            ));
        }
    }
View Full Code Here

   static void checkConfiguration(boolean condition, String format, Object... args) {
      if (condition) {
         return;
      }

      throw new ConfigurationException(ImmutableSet.of(new Message(String.format(format, args))));
   }
View Full Code Here

      if (reference != null) {
         return reference;
      }

      NullPointerException npe = new NullPointerException(name);
      throw new ConfigurationException(ImmutableSet.of(new Message(ImmutableList.of(), npe.toString(), npe)));
   }
View Full Code Here

            overridePropertyValuesWithSystemProperties(initProperties, overridableProperties());
            replacePlaceholderWithValue(initProperties, "%contextRoot%", getContextRootValue(initProperties));
            return initProperties;
        } catch (IOException e) {
            throw new CreationException(Arrays.asList(
                    new Message("Unable to load properties from resource"
                            + ". " + e.getMessage())
            ));
        }
    }
View Full Code Here

    try {
      is = ResourceLoader.openResource(propertyFile);
      properties.load(is);
    } catch (IOException e) {
      throw new CreationException(Arrays.asList(
          new Message("Unable to load properties: " + propertyFile)));
    } finally {
      IOUtils.closeQuietly( is );
    }

    return properties;
View Full Code Here

  private void copyErrorsToBinder(ConfigurationException paramConfigurationException)
  {
    Iterator localIterator = paramConfigurationException.getErrorMessages().iterator();
    while (localIterator.hasNext())
    {
      Message localMessage = (Message)localIterator.next();
      this.binder.addError(localMessage);
    }
  }
View Full Code Here

  private void copyErrorsToBinder(ConfigurationException paramConfigurationException)
  {
    Iterator localIterator = paramConfigurationException.getErrorMessages().iterator();
    while (localIterator.hasNext())
    {
      Message localMessage = (Message)localIterator.next();
      this.binder.addError(localMessage);
    }
  }
View Full Code Here

  }

  public ProvisionException(String paramString, Throwable paramThrowable)
  {
    super(paramThrowable);
    this.messages = $ImmutableSet.of(new Message($ImmutableList.of(), paramString, paramThrowable));
  }
View Full Code Here

TOP

Related Classes of com.google.inject.spi.Message

Copyright © 2018 www.massapicom. 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.