public class TypeMap
extends java.lang.Object
Constructor | Description |
---|---|
TypeMap(int initialSize) |
Constructor for TypeMap.
|
TypeMap(java.lang.Class<?>... types) |
Constructor for TypeMap that takes in an initial set of types.
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(java.lang.Class<?> type) |
Adds a type to the receiver and stores it keyed by both its full and
short names.
|
void |
add(java.lang.Class<?>... types) |
Adds an array of types to the receiver at once.
|
java.util.Map<java.lang.Class<?>,java.lang.String> |
asInverseWithShortName() |
Creates and returns a map of short type names (without the package
prefixes) keyed by the classes themselves.
|
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.
|
int |
size() |
Returns the total number of entries in the receiver.
|
java.lang.Class<?> |
typeFor(java.lang.String typeName) |
Returns the type for the typeName specified.
|
public TypeMap(int initialSize)
initialSize
- intpublic TypeMap(java.lang.Class<?>... types)
types
- Class[]public void add(java.lang.Class<?> type)
type
- Classjava.lang.IllegalArgumentException
public boolean contains(java.lang.Class<?> type)
type
- Classpublic boolean contains(java.lang.String typeName)
typeName
- Stringpublic java.lang.Class<?> typeFor(java.lang.String typeName)
typeName
- Stringpublic void add(java.lang.Class<?>... types)
types
- Class[]public java.util.Map<java.lang.Class<?>,java.lang.String> asInverseWithShortName()
public int size()
Copyright © 2002–2018 PMD. All rights reserved.