net.sourceforge.pmd.util
Class TypeMap

java.lang.Object
  extended by net.sourceforge.pmd.util.TypeMap

public class TypeMap
extends java.lang.Object

A specialized map that stores classes by both their full and short names.

Author:
Brian Remedios

Constructor Summary
TypeMap(java.lang.Class... types)
          Constructor for TypeMap that takes in an initial set of types.
TypeMap(int initialSize)
          Constructor for TypeMap.
 
Method Summary
 void add(java.lang.Class... types)
          Adds an array of types to the receiver at once.
 void add(java.lang.Class type)
          Adds a type to the receiver and stores it keyed by both its full and short names.
 boolean contains(java.lang.Class type)
          Returns whether the type is known to the receiver.
 boolean contains(java.lang.String typeName)
          Returns whether the typeName is known to the receiver.
 java.lang.Class typeFor(java.lang.String typeName)
          Returns the type for the typeName specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeMap

public TypeMap(int initialSize)
Constructor for TypeMap.

Parameters:
initialSize - int

TypeMap

public TypeMap(java.lang.Class... types)
Constructor for TypeMap that takes in an initial set of types.

Parameters:
types - Class[]
Method Detail

add

public void add(java.lang.Class type)
Adds a type to the receiver and stores it keyed by both its full and short names.

Parameters:
type - Class

contains

public boolean contains(java.lang.Class type)
Returns whether the type is known to the receiver.

Parameters:
type - Class
Returns:
boolean

contains

public boolean contains(java.lang.String typeName)
Returns whether the typeName is known to the receiver.

Parameters:
typeName - String
Returns:
boolean

typeFor

public java.lang.Class typeFor(java.lang.String typeName)
Returns the type for the typeName specified.

Parameters:
typeName - String
Returns:
Class

add

public void add(java.lang.Class... types)
Adds an array of types to the receiver at once.

Parameters:
types - Class[]


Copyright © 2002-2011 InfoEther. All Rights Reserved.