org.apache.avalon.meta.info
Class InfoDescriptor

java.lang.Object
  extended byorg.apache.avalon.meta.info.Descriptor
      extended byorg.apache.avalon.meta.info.InfoDescriptor
All Implemented Interfaces:
Serializable

public final class InfoDescriptor
extends Descriptor

This class is used to provide explicit information to assembler and administrator about the Component. It includes information such as;

The InfoDescriptor also includes an arbitrary set of attributes about component. Usually these are container specific attributes that can store arbitrary information. The attributes should be stored with keys based on package name of container.

Version:
$Revision: 1.7 $ $Date: 2003/07/24 12:12:00 $
Author:
Avalon Development Team
See Also:
Serialized Form

Field Summary
static String POOLED
           
static String SINGLETON
           
static String THREAD
           
static String TRANSIENT
           
 
Constructor Summary
InfoDescriptor(String classname)
          Creation of a new component descriptor using a supplied name, key, version and attribute set.
InfoDescriptor(String name, String classname, Version version, String lifestyle, String schema, Properties attributes)
          Creation of a new info descriptor using a supplied name, key, version and attribute set.
 
Method Summary
 boolean equals(Object other)
          Test is the supplied object is equal to this object.
 String getClassname()
          Return the implementation class name for the component type.
 String getConfigurationSchema()
          Return the configuration schema.
 String getLifestyle()
          Return the component lifestyle.
 String getName()
          Return the symbolic name of component.
 Version getVersion()
          Return the version of component.
 int hashCode()
          Return the hashcode for the object.
 String toString()
          Return a string representation of the info descriptor.
 
Methods inherited from class org.apache.avalon.meta.info.Descriptor
getAttribute, getAttribute, getAttributeNames, getProperties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TRANSIENT

public static final String TRANSIENT
See Also:
Constant Field Values

SINGLETON

public static final String SINGLETON
See Also:
Constant Field Values

THREAD

public static final String THREAD
See Also:
Constant Field Values

POOLED

public static final String POOLED
See Also:
Constant Field Values
Constructor Detail

InfoDescriptor

public InfoDescriptor(String classname)
               throws IllegalArgumentException
Creation of a new component descriptor using a supplied name, key, version and attribute set.

Parameters:
classname - the implemetation classname
Throws:
IllegalArgumentException - if the implementation key is not a classname

InfoDescriptor

public InfoDescriptor(String name,
                      String classname,
                      Version version,
                      String lifestyle,
                      String schema,
                      Properties attributes)
               throws IllegalArgumentException
Creation of a new info descriptor using a supplied name, key, version and attribute set.

Parameters:
name - the component name
classname - the implemetation classname
version - the implementation version
attributes - a set of attributes associated with the component type
Throws:
IllegalArgumentException - if the implementation key is not a classname
Method Detail

getName

public String getName()
Return the symbolic name of component.

Returns:
the symbolic name of component.

getConfigurationSchema

public String getConfigurationSchema()
Return the configuration schema.

Returns:
the schema declaration (possibly null)

getClassname

public String getClassname()
Return the implementation class name for the component type.

Returns:
the implementation class name

getVersion

public Version getVersion()
Return the version of component.

Returns:
the version of component.

getLifestyle

public String getLifestyle()
Return the component lifestyle.

Returns:
the lifestyle

toString

public String toString()
Return a string representation of the info descriptor.

Returns:
the stringified type

equals

public boolean equals(Object other)
Test is the supplied object is equal to this object.

Overrides:
equals in class Descriptor
Parameters:
other - the object to compare this object with
Returns:
true if the object are equivalent

hashCode

public int hashCode()
Return the hashcode for the object.

Overrides:
hashCode in class Descriptor
Returns:
the hashcode value


Copyright © Apache Software Foundation. All Rights Reserved.