org.jboss.metatype.plugins.values.mappers
Class PropertiesObjectNameMetaMapper

java.lang.Object
  extended by org.jboss.metatype.spi.values.MetaMapper<ObjectName>
      extended by org.jboss.metatype.plugins.values.mappers.PropertiesObjectNameMetaMapper

public class PropertiesObjectNameMetaMapper
extends MetaMapper<ObjectName>

An ObjectName MetaMapper that maps to a PropertiesMetaType/PropertiesMetaValue.

Version:
$Revision: 87758 $
Author:
Scott.Stark@jboss.org, Ales.Justin@jboss.org

Constructor Summary
PropertiesObjectNameMetaMapper()
           
PropertiesObjectNameMetaMapper(String... args)
           
 
Method Summary
 MetaValue createMetaValue(MetaType metaType, ObjectName object)
          Create the meta value
static ObjectName createObjectName(String domain, PropertiesMetaValue props)
          Create object name from PropertiesMetaValue.
 MetaType getMetaType()
          Override this method to create your own metatype
 Type mapToType()
          Override this method to map to a specific type
 ObjectName unwrapMetaValue(MetaValue metaValue)
          Unwrap the metavalue
 
Methods inherited from class org.jboss.metatype.spi.values.MetaMapper
getMetaMapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesObjectNameMetaMapper

public PropertiesObjectNameMetaMapper()

PropertiesObjectNameMetaMapper

public PropertiesObjectNameMetaMapper(String... args)
Method Detail

getMetaType

public MetaType getMetaType()
Description copied from class: MetaMapper
Override this method to create your own metatype

Overrides:
getMetaType in class MetaMapper<ObjectName>
Returns:
the metatype

mapToType

public Type mapToType()
Description copied from class: MetaMapper
Override this method to map to a specific type

Overrides:
mapToType in class MetaMapper<ObjectName>
Returns:
the type

createMetaValue

public MetaValue createMetaValue(MetaType metaType,
                                 ObjectName object)
Description copied from class: MetaMapper
Create the meta value

Specified by:
createMetaValue in class MetaMapper<ObjectName>
Parameters:
metaType - the metatype
object - the object
Returns:
the meta value

unwrapMetaValue

public ObjectName unwrapMetaValue(MetaValue metaValue)
Description copied from class: MetaMapper
Unwrap the metavalue

Specified by:
unwrapMetaValue in class MetaMapper<ObjectName>
Parameters:
metaValue - the meta value
Returns:
the object

createObjectName

public static ObjectName createObjectName(String domain,
                                          PropertiesMetaValue props)
                                   throws MalformedObjectNameException
Create object name from PropertiesMetaValue. Make it JDK 1.6 compatible.

Parameters:
domain - the domain name
props - the props
Returns:
new ObjectName instance
Throws:
MalformedObjectNameException - for any error


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