org.jvnet.hk2.config.types.Property.getValue()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中org.jvnet.hk2.config.types.Property.getValue()方法的一些代码示例,展示了Property.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.getValue()方法的具体详情如下:
包路径:org.jvnet.hk2.config.types.Property
类名称:Property
方法名:getValue

Property.getValue介绍

[英]Gets the value of the value property.
[中]获取value属性的值。

代码示例

代码示例来源:origin: javaee/glassfish

@Override
public String getPropertyValue(PropertyBag me, String name,
    String defaultValue) {
  Property prop = getProperty(me, name);
  if (prop != null) {
    return prop.getValue();
  }
  return defaultValue;
}

代码示例来源:origin: javaee/glassfish

public static String getPropertyValue(PropertyBag me, String name, String defaultValue) {
    Property prop = getProperty(me, name);
    if (prop != null) {
      return prop.getValue();
    }
    return defaultValue;
  }
}

代码示例来源:origin: org.glassfish.main.admin/config-api

public static String getGroupMapping(AuthRealm me) {
    Property prop = me.getProperty("group-mapping"); //have to hard-code this, unfortunately :(
    if (prop != null)
      return prop.getValue();
    return null;
  }
}

代码示例来源:origin: org.glassfish.main.admin/config-api

@Override
  public Object run(AccessLog param) {
    param.setBufferSizeBytes(property.getValue());
    return param;
  }
}, service.getAccessLog());

代码示例来源:origin: org.glassfish.main.admin/config-api

@Override
  public Object run(AccessLog param) {
    param.setWriteIntervalSeconds(property.getValue());
    return param;
  }
}, service.getAccessLog());

代码示例来源:origin: org.glassfish.admin/config-api

@Override
  public Object run(AccessLog param) {
    param.setWriteIntervalSeconds(property.getValue());
    return param;
  }
}, service.getAccessLog());

代码示例来源:origin: org.glassfish.main.core/kernel

@Override
public String getPropertyValue(String name, String defaultValue) {
  final Property property = getProperty(name);
  if (property != null) {
    return property.getValue();
  }
  return defaultValue;
}

代码示例来源:origin: org.glassfish.hk2/config-types

public static String getPropertyValue(PropertyBag me, String name, String defaultValue) {
    Property prop = getProperty(me, name);
    if (prop != null) {
      return prop.getValue();
    }
    return defaultValue;
  }
}

代码示例来源:origin: org.glassfish.main.admin/config-api

private String getValue(List<Property> list, String property) {
  final Iterator<Property> iterator = list.iterator();
  while (iterator.hasNext()) {
    Property prop = iterator.next();
    if (property.equals(prop.getName())) {
      iterator.remove();
      return prop.getValue();
    }
  }
  return null;
}

代码示例来源:origin: org.glassfish.connectors/connectors-runtime

private Properties transformProps(List<Property> domainProps) {

    Properties props = new Properties();
    for (Property domainProp : domainProps) {
      props.setProperty(domainProp.getName(), domainProp.getValue());
    }
    return props;
  }
}

代码示例来源:origin: org.glassfish.admin/config-api

public static String getGroupMapping(AuthRealm me) {
    Property prop = me.getProperty("group-mapping"); //have to hard-code this, unfortunately :(
    if (prop != null)
      return prop.getValue();
    return null;
  }
}

代码示例来源:origin: org.glassfish.admin/config-api

@Override
  public Object run(AccessLog param) {
    param.setBufferSizeBytes(property.getValue());
    return param;
  }
}, service.getAccessLog());

代码示例来源:origin: org.glassfish.admin/config-api

private String getValue(List<Property> list, String property) {
    final Iterator<Property> iterator = list.iterator();
    while (iterator.hasNext()) {
      Property prop = iterator.next();
      if (property.equals(prop.getName())) {
        iterator.remove();
        return prop.getValue();
      }
    }
    return null;
  }
}

代码示例来源:origin: org.glassfish.main.orb/orb-iiop

private void checkForOrbPropertyValues(Properties props) {
  if (orbBean != null) {
    List<Property> orbBeanProps = orbBean.getProperty();
    if (orbBeanProps != null) {
      for (int i = 0; i < orbBeanProps.size(); i++) {
        props.setProperty(orbBeanProps.get(i).getName(),
        orbBeanProps.get(i).getValue());
      }
    }
  }
}

代码示例来源:origin: org.glassfish.main.admin/config-api

private static File fileForProp(final Application instance,
    final String propName) {
  for (Property p : instance.getProperty()) {
    if (p.getName().equals(propName)) {
      return new File(URI.create(p.getValue()));
    }
  }
  return null;
}

代码示例来源:origin: org.ancoron.glassfish.lib/org.ancoron.glassfish.lib.resources

@Override
public boolean contains(Object o) {
  if (!(o instanceof Property)) {
    return false;
  }
  Property prop = Property.class.cast(o);
  String value = delegate.getProperties().getProperty(prop.getName());
  return value != null && value.equals(prop.getValue());
}

代码示例来源:origin: org.ancoron.glassfish.lib/org.ancoron.glassfish.lib.resources

@Override
public boolean add(Property e) {
  Property prop = Property.class.cast(e);
  Object old = delegate.getProperties().setProperty(prop.getName(), prop.getValue());
  return old != null;
}

代码示例来源:origin: org.glassfish.main.admin/config-api

public static String archiveType(final Application instance) {
  for (Property p : instance.getProperty()) {
    if (p.getName().equals(ARCHIVE_TYPE_PROP_NAME)) {
      return p.getValue();
    }
  }
  return null;
}

代码示例来源:origin: org.glassfish.web/web-glue

/**
 * Sets the alternate docroots of this web module from the given
 * "alternatedocroot_" properties.
 */
void setAlternateDocBases(List <Property> props) {
  if (props == null) {
    return;
  }
  for (Property prop : props) {
    parseAlternateDocBase(prop.getName(), prop.getValue());
  }
}

代码示例来源:origin: org.glassfish.main.cluster/cluster-admin

private void createDefaultNode(Domain d, Nodes nodes)
      throws TransactionFailure, PropertyVetoException {
    Property domainProp = d.getProperty("administrative.domain.name");
    String domainName = domainProp.getValue();
    Node node = nodes.createChild(Node.class);
    node.setName("localhost" + "-" + domainName);
    node.setType("CONFIG");
    node.setNodeHost("localhost");
    node.setInstallDir("${com.sun.aas.productRoot}");
    nodes.getNode().add(node);
  }
}

相关文章

微信公众号

最新文章

更多