Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sourceforge.pmd.util
Class TypeMap

    java.lang.Object
      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[]

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2009 InfoEther. All Rights Reserved.