org.apache.avalon.meta.info
Class EntryDescriptor

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

public final class EntryDescriptor
extends Object
implements Serializable

A descriptor that describes a value that must be placed in components Context. It contains information about;

Version:
$Revision: 1.3 $ $Date: 2004/01/24 23:20:45 $
Author:
Avalon Development Team
See Also:
Serialized Form

Constructor Summary
EntryDescriptor(String key, String classname)
          Construct an non-volotile required Entry.
EntryDescriptor(String key, String classname, boolean optional)
          Construct an non-volotile Entry.
EntryDescriptor(String key, String classname, boolean optional, boolean isVolatile)
          Construct an Entry.
EntryDescriptor(String key, String classname, boolean optional, boolean isVolatile, String alias)
          Construct an Entry.
 
Method Summary
 boolean equals(Object other)
          Test is the supplied object is equal to this object.
 String getAlias()
          Return the alias that Component uses to lookup the entry.
 String getClassname()
          Return the key type of value that is stored in Context.
 String getKey()
          Return the key that Component uses to lookup entry.
 int hashCode()
          Return the hashcode for the object.
 boolean isOptional()
          Return true if entry is optional, false otherwise.
 boolean isRequired()
          Return true if entry is required, false otherwise.
 boolean isVolatile()
          Return true if entry is volotile.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntryDescriptor

public EntryDescriptor(String key,
                       String classname)
                throws NullPointerException
Construct an non-volotile required Entry.

Parameters:
key - the context entry key
classname - the classname of the context entry
Throws:
NullPointerException - if the key or type value are null

EntryDescriptor

public EntryDescriptor(String key,
                       String classname,
                       boolean optional)
                throws NullPointerException
Construct an non-volotile Entry.

Parameters:
key - the context entry key
classname - the classname of the context entry
optional - TRUE if this is an optional entry
Throws:
NullPointerException - if the key or type value are null

EntryDescriptor

public EntryDescriptor(String key,
                       String classname,
                       boolean optional,
                       boolean isVolatile)
                throws NullPointerException
Construct an Entry.

Parameters:
key - the context entry key
classname - the classname of the context entry
optional - TRUE if this is an optional entry
isVolatile - TRUE if the entry is consider to be immutable
Throws:
NullPointerException - if the key or type value are null

EntryDescriptor

public EntryDescriptor(String key,
                       String classname,
                       boolean optional,
                       boolean isVolatile,
                       String alias)
                throws NullPointerException
Construct an Entry.

Parameters:
key - the context entry key
classname - the classname of the context entry
optional - TRUE if this is an optional entry
isVolatile - TRUE if the entry is is volatile
alias - an alternative key used by the component to reference the key
Throws:
NullPointerException - if the key or type value are null
Method Detail

getKey

public String getKey()
Return the key that Component uses to lookup entry.

Returns:
the key that Component uses to lookup entry.

getAlias

public String getAlias()
Return the alias that Component uses to lookup the entry. If no alias is declared, the standard lookup key will be returned.

Returns:
the alias to the key.

getClassname

public String getClassname()
Return the key type of value that is stored in Context.

Returns:
the key type of value that is stored in Context.

isOptional

public boolean isOptional()
Return true if entry is optional, false otherwise.

Returns:
true if entry is optional, false otherwise.

isRequired

public boolean isRequired()
Return true if entry is required, false otherwise.

Returns:
true if entry is required, false otherwise.

isVolatile

public boolean isVolatile()
Return true if entry is volotile.

Returns:
the volatile state of the entry

equals

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

Parameters:
other - the object to compare with this instance
Returns:
true if the object are equivalent

hashCode

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

Returns:
the hashcode value


Copyright © The Apache Software Foundation. All Rights Reserved.