org.jboss.metatype.api.types
Class PropertiesMetaType

java.lang.Object
  extended by org.jboss.metatype.api.types.AbstractMetaType
      extended by org.jboss.metatype.api.types.PropertiesMetaType
All Implemented Interfaces:
Serializable, MetaType

public class PropertiesMetaType
extends AbstractMetaType

A MetaType for java.util.Properties

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

Field Summary
static PropertiesMetaType INSTANCE
           
 
Fields inherited from interface org.jboss.metatype.api.types.MetaType
ALLOWED_CLASSNAMES
 
Constructor Summary
PropertiesMetaType()
           
PropertiesMetaType(String description)
           
PropertiesMetaType(String description, Map<String,String> propertyNameDescriptions)
           
 
Method Summary
 void addProperty(String name, String description)
           
 boolean equals(Object obj)
          Equality of PropertiesMetaType is just based on the class
 String getDescription(String name)
           
 int hashCode()
           
 boolean isProperties()
          Return whether the type is a PropertiesMetaType type.
 boolean isProperty(String name)
           
 boolean isValue(Object obj)
          Whether the passed value is one of those described by this meta type.
 
Methods inherited from class org.jboss.metatype.api.types.AbstractMetaType
getClassName, getDescription, getTypeName, isArray, isCollection, isComposite, isEnum, isGeneric, isPrimitive, isSimple, isTable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final PropertiesMetaType INSTANCE
Constructor Detail

PropertiesMetaType

public PropertiesMetaType()

PropertiesMetaType

public PropertiesMetaType(String description)

PropertiesMetaType

public PropertiesMetaType(String description,
                          Map<String,String> propertyNameDescriptions)
Method Detail

addProperty

public void addProperty(String name,
                        String description)

isProperty

public boolean isProperty(String name)

getDescription

public String getDescription(String name)

isProperties

public boolean isProperties()
Description copied from interface: MetaType
Return whether the type is a PropertiesMetaType type.

Specified by:
isProperties in interface MetaType
Overrides:
isProperties in class AbstractMetaType
Returns:
true if type is a PropertiesMetaType
See Also:
PropertiesMetaType

isValue

public boolean isValue(Object obj)
Description copied from interface: MetaType
Whether the passed value is one of those described by this meta type.

Specified by:
isValue in interface MetaType
Specified by:
isValue in class AbstractMetaType
Parameters:
obj - the object to test
Returns:
true when it is value for this meta type, false otherwise

equals

public boolean equals(Object obj)
Equality of PropertiesMetaType is just based on the class

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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