Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.puppycrawl.tools.checkstyle.checks.usage.transmogrify
Class LiteralResolver  view LiteralResolver download LiteralResolver.java

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.checks.usage.transmogrify.LiteralResolver

public class LiteralResolver
extends java.lang.Object

Resolves primitive identifiers (int, double) to their corresponding ClassDef. This class uses the Singleton pattern.

Since:
1.0
Version:
1.0

Field Summary
private static java.util.Map classMap
           
private static java.util.Map intMap
           
private static java.util.Map nameMap
           
 
Constructor Summary
LiteralResolver()
           
 
Method Summary
static SymTabAST getASTNode(IClass primitive)
           
static IClass getDefinition(int literalType)
          Returns the ClassDef for a primitive type reference.
static IClass getDefinition(java.lang.String name)
           
static LiteralResolver getResolver()
          Returns a LiteralResolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

intMap

private static java.util.Map intMap

nameMap

private static java.util.Map nameMap

classMap

private static java.util.Map classMap
Constructor Detail

LiteralResolver

public LiteralResolver()
Method Detail

getResolver

public static LiteralResolver getResolver()
Returns a LiteralResolver


getDefinition

public static IClass getDefinition(int literalType)
Returns the ClassDef for a primitive type reference.

We could probably do without passing in the context, if we could figure out a way to access the base scope.


getDefinition

public static IClass getDefinition(java.lang.String name)

getASTNode

public static SymTabAST getASTNode(IClass primitive)