de.fu_berlin.ties.extract
Class TargetStructure

java.lang.Object
  extended byde.fu_berlin.ties.extract.TargetStructure

public class TargetStructure
extends Object

A target structure manages the classes of entities to recognize. Instances of this class are immutable and thus thread-safe.

Version:
$Revision: 1.3 $, $Date: 2004/02/08 21:25:59 $, $Author: siefkes $
Author:
Christian Siefkes

Field Summary
protected static String CONFIG_TARGET_CLASSES
          Configuration key: names of the classes to recognize (temporarily).
 
Constructor Summary
TargetStructure()
          Creates a new instance using the standard configuration.
TargetStructure(Configuration config)
          Creates a new instance using the provided configuration.
 
Method Summary
 TargetClass classForName(String name)
          Returns the TargetClass object for a given class name, if defined in this target structure.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one, fulfulling the Object.equals(java.lang.Object) contract.
 Set getBaseClassNames()
          Returns the set of names of the target classes at the top of the inheritance hierarchy.
 Collection getBaseTargetClasses()
          Returns the TargetClasses at the top of the inheritance hierarchy.
 Set getClassNames()
          Returns the set of names of the defined target classes.
 Collection getTargetClasses()
          Returns the defined TargetClasses.
 int hashCode()
          Returns a hash code value for this object, fulfulling the Object.hashCode() contract.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CONFIG_TARGET_CLASSES

protected static final String CONFIG_TARGET_CLASSES
Configuration key: names of the classes to recognize (temporarily).

See Also:
Constant Field Values
Constructor Detail

TargetStructure

public TargetStructure()
Creates a new instance using the standard configuration.


TargetStructure

public TargetStructure(Configuration config)
Creates a new instance using the provided configuration. Currently, the names of target classes are read from the CONFIG_TARGET_CLASSES parameter.

Parameters:
config - used to configure this instance
Method Detail

classForName

public TargetClass classForName(String name)
Returns the TargetClass object for a given class name, if defined in this target structure.

Parameters:
name - the name of the class to look up
Returns:
the TargetClass for the given name; or null if the class is not defined in this target structure

getBaseClassNames

public Set getBaseClassNames()
Returns the set of names of the target classes at the top of the inheritance hierarchy. This set is immutable and cannot modified.

Returns:
the set of class names

getBaseTargetClasses

public Collection getBaseTargetClasses()
Returns the TargetClasses at the top of the inheritance hierarchy. This collection is immutable and cannot modified.

Returns:
the defined target classes

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one, fulfulling the Object.equals(java.lang.Object) contract.

Parameters:
obj - the reference object with which to compare
Returns:
true iff the specified object is a TargetStructure equal to this instance

getClassNames

public Set getClassNames()
Returns the set of names of the defined target classes. This set is immutable and cannot modified.

Returns:
the set of class names

getTargetClasses

public Collection getTargetClasses()
Returns the defined TargetClasses. This collection is immutable and cannot modified.

Returns:
the defined target classes

hashCode

public int hashCode()
Returns a hash code value for this object, fulfulling the Object.hashCode() contract.

Returns:
a hash code value for this object

toString

public String toString()
Returns a string representation of this object.

Returns:
a textual representation


Copyright © 2003-2004 Christian Siefkes. All Rights Reserved.