Save This Page
Home » openjdk-7 » com.sun.tools » javac » code » [javadoc | source]
com.sun.tools.javac.code
abstract public class: Printer [javadoc | source]
java.lang.Object
   com.sun.tools.javac.code.Printer

All Implemented Interfaces:
    Visitor, Visitor

Direct Known Subclasses:
    RichPrinter

A combined type/symbol visitor for generating non-trivial localized string representation of types and symbols.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Field Summary
 List<Type> seenCaptured     
static final  int PRIME     
Method from com.sun.tools.javac.code.Printer Summary:
capturedVarId,   className,   createStandardPrinter,   localize,   printMethodArgs,   visit,   visit,   visitArrayType,   visitCapturedType,   visitClassSymbol,   visitClassType,   visitErrorType,   visitForAll,   visitMethodSymbol,   visitMethodType,   visitOperatorSymbol,   visitPackageSymbol,   visitPackageType,   visitSymbol,   visitSymbols,   visitType,   visitTypeSymbol,   visitTypeVar,   visitTypes,   visitUndetVar,   visitVarSymbol,   visitWildcardType
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.tools.javac.code.Printer Detail:
 abstract protected String capturedVarId(CapturedType t,
    Locale locale)
    Maps a captured type into an unique identifier.
 protected String className(ClassType t,
    boolean longform,
    Locale locale) 
    Converts a class name into a (possibly localized) string. Anonymous inner classes gets converted into a localized string.
 public static Printer createStandardPrinter(Messages messages) 
    Create a printer with default i18n support provided by Messages. By default, captured types ids are generated using hashcode.
 abstract protected String localize(Locale locale,
    String key,
    Object args)
    This method should be overriden in order to provide proper i18n support.
 protected String printMethodArgs(List<Type> args,
    boolean varArgs,
    Locale locale) 
    Converts a set of method argument types into their corresponding localized string representation.
 public String visit(Type t,
    Locale locale) 
    Get a localized string represenation for a given type.
 public String visit(Symbol s,
    Locale locale) 
    Get a localized string represenation for a given symbol.
 public String visitArrayType(ArrayType t,
    Locale locale) 
 public String visitCapturedType(CapturedType t,
    Locale locale) 
 public String visitClassSymbol(ClassSymbol sym,
    Locale locale) 
 public String visitClassType(ClassType t,
    Locale locale) 
 public String visitErrorType(ErrorType t,
    Locale locale) 
 public String visitForAll(ForAll t,
    Locale locale) 
 public String visitMethodSymbol(MethodSymbol s,
    Locale locale) 
 public String visitMethodType(MethodType t,
    Locale locale) 
 public String visitOperatorSymbol(OperatorSymbol s,
    Locale locale) 
 public String visitPackageSymbol(PackageSymbol s,
    Locale locale) 
 public String visitPackageType(PackageType t,
    Locale locale) 
 public String visitSymbol(Symbol s,
    Locale locale) 
 public String visitSymbols(List<Symbol> ts,
    Locale locale) 
    * Get a localized string representation for all the symbols in the input list.
 public String visitType(Type t,
    Locale locale) 
 public String visitTypeSymbol(TypeSymbol s,
    Locale locale) 
 public String visitTypeVar(TypeVar t,
    Locale locale) 
 public String visitTypes(List<Type> ts,
    Locale locale) 
    Get a localized string representation for all the types in the input list.
 public String visitUndetVar(UndetVar t,
    Locale locale) 
 public String visitVarSymbol(VarSymbol s,
    Locale locale) 
 public String visitWildcardType(WildcardType t,
    Locale locale)