org.jcoderz.phoenix.dependency
Class RelationType

java.lang.Object
  extended by org.jcoderz.phoenix.dependency.RelationType
All Implemented Interfaces:
Serializable, EnumType, StrongType

public final class RelationType
extends Object
implements Serializable, EnumType

Enumeration that describes the kind of dependency that one type has with an other. Instances of this class are immutable. The following relation types are defined:

The values of this enum have a internal sequential integer representation starting with '0'.

Author:
generated
See Also:
Serialized Form

Field Summary
static RelationType ARGUMENT
          The other class is used as a argument in a method of this class.
static RelationType DERIVED
          This class is derived from the other class (value: Derived).
static RelationType FIELD
          The other class is used as field in a method of this class.
static RelationType GENERIC_TYPE
          This class uses the other as generic type.
static RelationType IMPLEMENTS
          This class implements from the other interface (value: Implements).
static RelationType MEMBER
          Instances of this class have a member of the other type.
static RelationType OUTER_CLASS
          Instances of this class have a outer class relation ship to the other type.
static RelationType STATIC_ARGUMENT
          The other class is used as a argument in a static method of this class.
static RelationType STATIC_FIELD
          The other class is used as field in a static method of this class.
static RelationType STATIC_MEMBER
          This class has a static member of the other type.
static String TYPE_NAME
          The name of this type.
static RelationType UNUSED_IMPORT
          The other class is used in a unused import in this class.
static Map VALUE_MAP
          Immutable map using the name string as key holding the RelationTypes as values.
static List VALUES
          Immutable list of the RelationTypes.
 
Method Summary
static RelationType fromInt(int i)
          Creates a RelationType object from its int representation.
static RelationType fromString(String str)
          Creates a RelationType object from its String representation.
 int toInt()
          Returns the int representation of this relation type.
 String toString()
          Returns the String representation of this relation type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final String TYPE_NAME
The name of this type.

See Also:
Constant Field Values

DERIVED

public static final RelationType DERIVED
This class is derived from the other class (value: Derived).


IMPLEMENTS

public static final RelationType IMPLEMENTS
This class implements from the other interface (value: Implements).


GENERIC_TYPE

public static final RelationType GENERIC_TYPE
This class uses the other as generic type. (value: Generic Type).


STATIC_MEMBER

public static final RelationType STATIC_MEMBER
This class has a static member of the other type. (value: Static Member).


OUTER_CLASS

public static final RelationType OUTER_CLASS
Instances of this class have a outer class relation ship to the other type. (value: Outer Class).


MEMBER

public static final RelationType MEMBER
Instances of this class have a member of the other type. (value: Member).


STATIC_ARGUMENT

public static final RelationType STATIC_ARGUMENT
The other class is used as a argument in a static method of this class. (value: Static Argument).


ARGUMENT

public static final RelationType ARGUMENT
The other class is used as a argument in a method of this class. (value: Argument).


STATIC_FIELD

public static final RelationType STATIC_FIELD
The other class is used as field in a static method of this class. (value: Static Field).


FIELD

public static final RelationType FIELD
The other class is used as field in a method of this class. (value: Field).


UNUSED_IMPORT

public static final RelationType UNUSED_IMPORT
The other class is used in a unused import in this class. (value: Unused Import).


VALUES

public static final List VALUES
Immutable list of the RelationTypes.


VALUE_MAP

public static final Map VALUE_MAP
Immutable map using the name string as key holding the RelationTypes as values.

Method Detail

fromInt

public static RelationType fromInt(int i)
                            throws ArgumentMalformedException
Creates a RelationType object from its int representation.

Parameters:
i - the integer representation of the relation type.
Returns:
the RelationType object represented by this int.
Throws:
ArgumentMalformedException - If the assigned int value isn't listed in the internal relation type table.

fromString

public static RelationType fromString(String str)
                               throws ArgumentMalformedException
Creates a RelationType object from its String representation.

Parameters:
str - the string representation of the relation type.
Returns:
the RelationType object represented by this str.
Throws:
ArgumentMalformedException - If the given str value isn't listed in the internal relation type table.

toInt

public int toInt()
Returns the int representation of this relation type.

Specified by:
toInt in interface EnumType
Returns:
the int representation of this relation type.

toString

public String toString()
Returns the String representation of this relation type.

Overrides:
toString in class Object
Returns:
the String representation of this relation type.


Copyright 2007 The jCoderZ Project.