Examples of metaBean()


Examples of com.opengamma.financial.tool.ToolContext.metaBean()

    } catch (Throwable t) {
      return null;
    }
   
    // Populate the tool context from the remote component server
    for (MetaProperty<?> metaProperty : toolContext.metaBean().metaPropertyIterable()) {
      if (!metaProperty.name().equals("contextManager")) {
        try {
          ComponentInfo componentInfo = getComponentInfo(componentServer, classifierChain, metaProperty.propertyType());
          if (componentInfo == null) {
            s_logger.warn("Unable to populate tool context '" + metaProperty.name() +
View Full Code Here

Examples of com.opengamma.financial.tool.ToolContext.metaBean()

  //-------------------------------------------------------------------------
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) {
    ToolContext context = createToolContext();
    Map<String, MetaProperty<?>> mapTarget = new HashMap<String, MetaProperty<?>>(context.metaBean().metaPropertyMap());
    mapTarget.keySet().retainAll(this.metaBean().metaPropertyMap().keySet());
    for (MetaProperty<?> mp : mapTarget.values()) {
      mp.set(context, mp.get(this));
    }
    context.setContextManager(repo);
View Full Code Here

Examples of com.opengamma.util.db.tool.DbToolContext.metaBean()

  //-------------------------------------------------------------------------
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) {
    DbToolContext dbToolContext = new DbToolContext();
    Map<String, MetaProperty<?>> mapTarget = new HashMap<String, MetaProperty<?>>(dbToolContext.metaBean().metaPropertyMap());
    mapTarget.keySet().retainAll(this.metaBean().metaPropertyMap().keySet());
    for (MetaProperty<?> mp : mapTarget.values()) {
      mp.set(dbToolContext, mp.get(this));
    }
    final String catalog = getCatalog(getJdbcUrl());
View Full Code Here

Examples of org.joda.beans.Bean.metaBean()

   */
  public static <T> ConfigItem<T> of(final T object) {
    final ConfigItem<T> item = new ConfigItem<T>(object);
    if (object instanceof Bean) {
      final Bean bean = (Bean) object;
      if (bean.metaBean().metaPropertyExists("name")) {
        item.setName(ObjectUtils.toString(bean.property("name").get(), null));
      }
    } else if (object != null) {
      try {
        item.setName((String) object.getClass().getMethod("getName").invoke(object));
View Full Code Here

Examples of org.joda.beans.Bean.metaBean()

   * @throws Exception allowing throwing of a checked exception
   */
  protected void setFactoryProperties(ComponentFactory factory, LinkedHashMap<String, String> remainingConfig) throws Exception {
    if (factory instanceof Bean) {
      Bean bean = (Bean) factory;
      for (MetaProperty<?> mp : bean.metaBean().metaPropertyIterable()) {
        String value = remainingConfig.remove(mp.name());
        setProperty(bean, mp, value);
      }
    }
  }
View Full Code Here

Examples of org.joda.beans.Bean.metaBean()

      return convertedValue;
    }
    if (Bean.class.isAssignableFrom(value.getClass())) {
      Bean bean = (Bean) value;
      BuildingBeanVisitor<JSONObject> visitor = new BuildingBeanVisitor<>(bean, new JsonDataSink(_converters));
      return traverser.traverse(bean.metaBean(), visitor);
    } else {
      throw new IllegalArgumentException("Unable to convert " + value.getClass().getName());
    }
  }
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.