JBoss Managed Parent POM 2.1.1.SP2

org.jboss.metatype.api.values
Class PropertiesMetaValue

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<Object,Object>
          extended by java.util.Properties
              extended by org.jboss.metatype.api.values.PropertiesMetaValue
All Implemented Interfaces:
Serializable, Cloneable, Map<Object,Object>, MetaValue

public class PropertiesMetaValue
extends Properties
implements MetaValue

A mapping from the jdk Properties to a MetaValue

Version:
$Revision: 87524 $
Author:
Scott.Stark@jboss.org
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
PropertiesMetaValue()
          Creates an empty PropertiesMetaValue
PropertiesMetaValue(Properties props)
          Create a PropertiesMetaValue with props as the defaults.
PropertiesMetaValue(Properties props, PropertiesMetaType type)
          Create a PropertiesMetaValue with props as the defaults.
 
Method Summary
 MetaValue clone()
          Clone the meta value
 PropertiesMetaType getMetaType()
          Get the metatype for this value
static PropertiesMetaValue wrap(Map<String,String> props)
          Build a PropertiesMetaValue from a Properties by copying all key/value pairs from props into the new PropertiesMetaValue.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clear, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertiesMetaValue

public PropertiesMetaValue()
Creates an empty PropertiesMetaValue


PropertiesMetaValue

public PropertiesMetaValue(Properties props)
Create a PropertiesMetaValue with props as the defaults. If you want to create a PropertiesMetaValue with only the key/value pairs of props use #wrap(Properties).

Parameters:
props - - default properties

PropertiesMetaValue

public PropertiesMetaValue(Properties props,
                           PropertiesMetaType type)
Create a PropertiesMetaValue with props as the defaults. If you want to create a PropertiesMetaValue with only the key/value pairs of props use #wrap(Properties).

Parameters:
props - - default properties
type - - the properties
Method Detail

wrap

public static PropertiesMetaValue wrap(Map<String,String> props)
Build a PropertiesMetaValue from a Properties by copying all key/value pairs from props into the new PropertiesMetaValue.

Parameters:
props - - the Properties to copy
Returns:
PropertiesMetaValue

getMetaType

public PropertiesMetaType getMetaType()
Description copied from interface: MetaValue
Get the metatype for this value

Specified by:
getMetaType in interface MetaValue
Returns:
the metatype

clone

public MetaValue clone()
Description copied from interface: MetaValue
Clone the meta value

Specified by:
clone in interface MetaValue
Overrides:
clone in class Hashtable<Object,Object>
Returns:
the cloned meta value

JBoss Managed Parent POM 2.1.1.SP2

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.