Mojarra JSF Tools 2.1.28.SP9

com.sun.faces.generate
Class AbstractGenerator

java.lang.Object
  extended by com.sun.faces.generate.AbstractGenerator
All Implemented Interfaces:
Generator
Direct Known Subclasses:
AttributeManagerGenerator, HtmlComponentGenerator, HtmlTaglib12Generator

public abstract class AbstractGenerator
extends Object
implements Generator

Abstract base class for Java and TLD generators.

The methods in this class presume the following command line option names and corresponding values:


Nested Class Summary
protected static class AbstractGenerator.CodeWriter
           
 
Field Summary
protected static Set<String> JAVA_KEYWORDS
           
protected static Map<String,String> TYPE_DEFAULTS
           
 
Constructor Summary
AbstractGenerator()
           
 
Method Summary
protected static String capitalize(String name)
          Return the capitalized version of the specified property name.
protected static String mangle(String name)
          Return a mangled version of the specified name if it conflicts with a Java keyword; otherwise, return the specified name unchanged.
protected static Map<String,String> options(String[] args)
          Parse the command line options into a Map.
protected static boolean primitive(String type)
          Return true if the specified type is a primitive.
protected static String shortName(String className)
          Return the short class name from the specified (potentially fully qualified) class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.faces.generate.Generator
generate
 

Field Detail

TYPE_DEFAULTS

protected static final Map<String,String> TYPE_DEFAULTS

JAVA_KEYWORDS

protected static final Set<String> JAVA_KEYWORDS
Constructor Detail

AbstractGenerator

public AbstractGenerator()
Method Detail

capitalize

protected static String capitalize(String name)

Return the capitalized version of the specified property name.

Parameters:
name - Uncapitalized property name

mangle

protected static String mangle(String name)

Return a mangled version of the specified name if it conflicts with a Java keyword; otherwise, return the specified name unchanged.

Parameters:
name - Name to be potentially mangled

options

protected static Map<String,String> options(String[] args)

Parse the command line options into a Map.

Parameters:
args - Command line arguments passed to this program
Throws:
IllegalArgumentException - if an option flag does not start with a '-' or is missing a corresponding value

primitive

protected static boolean primitive(String type)

Return true if the specified type is a primitive.

Parameters:
type - Type to be tested

shortName

protected static String shortName(String className)

Return the short class name from the specified (potentially fully qualified) class name. If the specified name has no periods, the input value is returned unchanged.

Parameters:
className - Class name that is optionally fully qualified

Mojarra JSF Tools 2.1.28.SP9

Copyright © 2016 JBoss by Red Hat. All Rights Reserved.