本文整理了Java中org.jvnet.hk2.config.types.Property.getName()
方法的一些代码示例,展示了Property.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.getName()
方法的具体详情如下:
包路径:org.jvnet.hk2.config.types.Property
类名称:Property
方法名:getName
[英]Gets the value of the name property.
[中]获取name属性的值。
代码示例来源:origin: javaee/glassfish
public static Property getProperty(PropertyBag me, String name) {
for (Property prop : me.getProperty()) {
if (prop.getName().equals(name)) {
return prop;
}
}
return null;
}
代码示例来源:origin: org.glassfish.main.core/kernel
@Override
public Property getProperty(String name) {
if (name == null) return null;
for(Property property : properties) {
if (name.equals(property.getName())) {
return property;
}
}
return null;
}
代码示例来源: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.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: eclipse-ee4j/glassfish
public static Property getProperty(PropertyBag me, String name) {
for (Property prop : me.getProperty()) {
if (prop.getName().equals(name)) {
return prop;
}
}
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.main.hk2/config-types
public static Property getProperty(PropertyBag me, String name) {
for (Property prop : me.getProperty()) {
if (prop.getName().equals(name)) {
return prop;
}
}
return null;
}
代码示例来源:origin: org.glassfish.hk2/config-types
public static Property getProperty(PropertyBag me, String name) {
for (Property prop : me.getProperty()) {
if (prop.getName().equals(name)) {
return prop;
}
}
return null;
}
代码示例来源:origin: org.ancoron.glassfish.lib/org.ancoron.glassfish.lib.resources
@Override
public boolean remove(Object o) {
Property prop = Property.class.cast(o);
return delegate.getProperties().remove(prop.getName()) != 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
public boolean isValid(final AuthRealm realm,
final ConstraintValidatorContext constraintValidatorContext) {
if (realm.getClassname().equals(FILE_REALM)) {
Property jaas_context = realm.getProperty("jaas-context");
Property file = realm.getProperty("file");
if (jaas_context == null || jaas_context.getName().equals(""))
return false;
if (file == null || file.getName().equals(""))
return false;
}
return true;
}
}
代码示例来源: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.glassfish.admin/config-api
public boolean isValid(final AuthRealm realm,
final ConstraintValidatorContext constraintValidatorContext) {
if (realm.getClassname().equals(FILE_REALM)) {
Property jaas_context = realm.getProperty("jaas-context");
Property file = realm.getProperty("file");
if (jaas_context == null || jaas_context.getName().equals(""))
return false;
if (file == null || file.getName().equals(""))
return false;
}
return true;
}
}
代码示例来源: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.glassfish.admin/config-api
public boolean isValid(final AuthRealm realm,
final ConstraintValidatorContext constraintValidatorContext) {
if (realm.getClassname().equals(SOLARIS_REALM)) {
Property jaas_context = realm.getProperty("jaas-context");
if (jaas_context == null || jaas_context.getName().equals(""))
return false;
}
return true;
}
}
代码示例来源: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 boolean isValid(final AuthRealm realm,
final ConstraintValidatorContext constraintValidatorContext) {
if (realm.getClassname().equals(SOLARIS_REALM)) {
Property jaas_context = realm.getProperty("jaas-context");
if (jaas_context == null || jaas_context.getName().equals(""))
return false;
}
return true;
}
}
代码示例来源:origin: org.glassfish.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.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());
}
}
内容来源于网络,如有侵权,请联系作者删除!