org.apache.myfaces.buildtools.maven2.plugin.faces.generator.component
Class AbstractComponentGenerator

java.lang.Object
  extended by org.apache.myfaces.buildtools.maven2.plugin.faces.generator.component.AbstractComponentGenerator
All Implemented Interfaces:
ClassGenerator, ComponentGenerator
Direct Known Subclasses:
MyFacesComponentGenerator, TrinidadComponentGenerator

public abstract class AbstractComponentGenerator
extends java.lang.Object
implements ComponentGenerator


Nested Class Summary
protected  class AbstractComponentGenerator.NonVirtualFilter
           
protected  class AbstractComponentGenerator.ResolvableTypeFilter
           
 
Constructor Summary
AbstractComponentGenerator(org.apache.maven.plugin.logging.Log log, boolean is12)
           
 
Method Summary
 void addGenericImports(java.util.Set imports, java.lang.String type)
           
protected  void addSpecificImports(java.util.Set imports, ComponentBean component)
           
protected  java.lang.String convertMultilineComment(java.lang.String commentBody)
           
protected  java.lang.String convertStringToBoxedLiteral(java.lang.String className, java.lang.String value)
           
protected  java.lang.String convertVariableToBoxedForm(java.lang.String className, java.lang.String varName)
           
protected  org.apache.maven.plugin.logging.Log getLog()
           
protected static java.lang.String getSingular(java.lang.String plural)
           
protected  boolean isAccessorMethodFinal()
          Whether the getters/setters have the final modifier
protected static java.lang.String resolveType(java.lang.String className)
           
 void writeClassBegin(PrettyWriter out, java.lang.String className, java.lang.String superclassName, ComponentBean component, SourceTemplate template)
           
 void writeClassEnd(PrettyWriter out)
           
 void writeConstructor(PrettyWriter out, ComponentBean component, int modifiers)
           
protected abstract  void writeConstructorContent(PrettyWriter out, ComponentBean component, int modifiers, java.lang.String rendererType)
           
 void writeFacetConstants(PrettyWriter out, ComponentBean component)
           
 void writeFacetGet(PrettyWriter out, FacetBean facet)
           
 void writeFacetMethods(PrettyWriter out, ComponentBean component)
           
 void writeFacetSet(PrettyWriter out, FacetBean facet)
           
 void writeGenericConstants(PrettyWriter out, java.lang.String componentFamily, java.lang.String componentType)
           
 void writeGetFamily(PrettyWriter out)
           
 void writeImports(PrettyWriter out, SourceTemplate template, java.lang.String packageName, java.lang.String fullSuperclassName, java.lang.String superclassName, java.util.Collection components)
           
 void writeImports(PrettyWriter out, SourceTemplate template, java.lang.String packageName, java.lang.String fullSuperclassName, java.lang.String superclassName, ComponentBean component)
           
 void writeListenerAdd(PrettyWriter out, EventBean event)
           
 void writeListenerMethods(PrettyWriter out, ComponentBean component)
           
 void writeListenerRemove(PrettyWriter out, EventBean event)
           
 void writeListenersGet(PrettyWriter out, EventBean event)
           
 void writeOther(PrettyWriter out, ComponentBean component)
           
 void writePropertyConstants(PrettyWriter out, java.lang.String superclassName, ComponentBean component)
           
protected abstract  void writePropertyDeclaration(PrettyWriter out, PropertyBean property)
           
protected  void writePropertyGet(PrettyWriter out, PropertyBean property, java.util.Collection ignoreList)
           
protected abstract  void writePropertyGetterMethodBody(PrettyWriter out, PropertyBean property)
           
protected abstract  void writePropertyListMethods(PrettyWriter out, PropertyBean property)
           
protected abstract  void writePropertyListMethods(PrettyWriter out, PropertyBean property, java.util.Collection inoreList)
           
 void writePropertyMethods(PrettyWriter out, ComponentBean component)
           
 void writePropertyMethods(PrettyWriter out, ComponentBean component, java.util.Collection ignoreList)
           
protected  void writePropertySet(PrettyWriter out, PropertyBean property, java.util.Collection ignoreList)
           
protected  void writePropertySet(PrettyWriter out, PropertyBean property, java.lang.String propertyClass, java.util.Collection ignoreList)
           
protected abstract  void writePropertySetterMethodBody(PrettyWriter out, PropertyBean property, java.lang.String propertyClass)
           
 void writePropertyValueConstants(PrettyWriter out, ComponentBean component)
           
abstract  void writeStateManagementMethods(PrettyWriter out, ComponentBean component)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractComponentGenerator

public AbstractComponentGenerator(org.apache.maven.plugin.logging.Log log,
                                  boolean is12)
Method Detail

getLog

protected org.apache.maven.plugin.logging.Log getLog()

writeClassBegin

public void writeClassBegin(PrettyWriter out,
                            java.lang.String className,
                            java.lang.String superclassName,
                            ComponentBean component,
                            SourceTemplate template)
Specified by:
writeClassBegin in interface ClassGenerator

writeClassEnd

public void writeClassEnd(PrettyWriter out)
Specified by:
writeClassEnd in interface ClassGenerator

writeImports

public void writeImports(PrettyWriter out,
                         SourceTemplate template,
                         java.lang.String packageName,
                         java.lang.String fullSuperclassName,
                         java.lang.String superclassName,
                         java.util.Collection components)
Specified by:
writeImports in interface ClassGenerator

writeImports

public void writeImports(PrettyWriter out,
                         SourceTemplate template,
                         java.lang.String packageName,
                         java.lang.String fullSuperclassName,
                         java.lang.String superclassName,
                         ComponentBean component)
Specified by:
writeImports in interface ClassGenerator

addSpecificImports

protected void addSpecificImports(java.util.Set imports,
                                  ComponentBean component)

addGenericImports

public void addGenericImports(java.util.Set imports,
                              java.lang.String type)

writeGenericConstants

public void writeGenericConstants(PrettyWriter out,
                                  java.lang.String componentFamily,
                                  java.lang.String componentType)
                           throws java.io.IOException
Specified by:
writeGenericConstants in interface ComponentGenerator
Throws:
java.io.IOException

writePropertyConstants

public void writePropertyConstants(PrettyWriter out,
                                   java.lang.String superclassName,
                                   ComponentBean component)
                            throws java.io.IOException
Specified by:
writePropertyConstants in interface ComponentGenerator
Throws:
java.io.IOException

writePropertyValueConstants

public void writePropertyValueConstants(PrettyWriter out,
                                        ComponentBean component)
                                 throws java.io.IOException
Specified by:
writePropertyValueConstants in interface ComponentGenerator
Throws:
java.io.IOException

writeFacetConstants

public void writeFacetConstants(PrettyWriter out,
                                ComponentBean component)
                         throws java.io.IOException
Specified by:
writeFacetConstants in interface ComponentGenerator
Throws:
java.io.IOException

convertStringToBoxedLiteral

protected java.lang.String convertStringToBoxedLiteral(java.lang.String className,
                                                       java.lang.String value)

convertVariableToBoxedForm

protected java.lang.String convertVariableToBoxedForm(java.lang.String className,
                                                      java.lang.String varName)

writeConstructor

public void writeConstructor(PrettyWriter out,
                             ComponentBean component,
                             int modifiers)
                      throws java.io.IOException
Specified by:
writeConstructor in interface ClassGenerator
Throws:
java.io.IOException

writeConstructorContent

protected abstract void writeConstructorContent(PrettyWriter out,
                                                ComponentBean component,
                                                int modifiers,
                                                java.lang.String rendererType)
                                         throws java.io.IOException
Throws:
java.io.IOException

writeGetFamily

public void writeGetFamily(PrettyWriter out)
                    throws java.io.IOException
Specified by:
writeGetFamily in interface ComponentGenerator
Throws:
java.io.IOException

writePropertyMethods

public void writePropertyMethods(PrettyWriter out,
                                 ComponentBean component)
                          throws java.io.IOException
Specified by:
writePropertyMethods in interface ComponentGenerator
Throws:
java.io.IOException

writePropertyMethods

public void writePropertyMethods(PrettyWriter out,
                                 ComponentBean component,
                                 java.util.Collection ignoreList)
                          throws java.io.IOException
Specified by:
writePropertyMethods in interface ComponentGenerator
Throws:
java.io.IOException

writePropertyListMethods

protected abstract void writePropertyListMethods(PrettyWriter out,
                                                 PropertyBean property,
                                                 java.util.Collection inoreList)
                                          throws java.io.IOException
Throws:
java.io.IOException

writePropertyListMethods

protected abstract void writePropertyListMethods(PrettyWriter out,
                                                 PropertyBean property)
                                          throws java.io.IOException
Throws:
java.io.IOException

getSingular

protected static java.lang.String getSingular(java.lang.String plural)

writePropertyDeclaration

protected abstract void writePropertyDeclaration(PrettyWriter out,
                                                 PropertyBean property)
                                          throws java.io.IOException
Throws:
java.io.IOException

writePropertySet

protected void writePropertySet(PrettyWriter out,
                                PropertyBean property,
                                java.util.Collection ignoreList)
                         throws java.io.IOException
Throws:
java.io.IOException

writePropertySet

protected void writePropertySet(PrettyWriter out,
                                PropertyBean property,
                                java.lang.String propertyClass,
                                java.util.Collection ignoreList)
                         throws java.io.IOException
Throws:
java.io.IOException

writePropertySetterMethodBody

protected abstract void writePropertySetterMethodBody(PrettyWriter out,
                                                      PropertyBean property,
                                                      java.lang.String propertyClass)
                                               throws java.io.IOException
Throws:
java.io.IOException

writePropertyGet

protected void writePropertyGet(PrettyWriter out,
                                PropertyBean property,
                                java.util.Collection ignoreList)
                         throws java.io.IOException
Throws:
java.io.IOException

isAccessorMethodFinal

protected boolean isAccessorMethodFinal()
Whether the getters/setters have the final modifier

Returns:
true if the getters/setters are final

writePropertyGetterMethodBody

protected abstract void writePropertyGetterMethodBody(PrettyWriter out,
                                                      PropertyBean property)
                                               throws java.io.IOException
Throws:
java.io.IOException

writeFacetMethods

public void writeFacetMethods(PrettyWriter out,
                              ComponentBean component)
                       throws java.io.IOException
Specified by:
writeFacetMethods in interface ComponentGenerator
Throws:
java.io.IOException

writeFacetSet

public void writeFacetSet(PrettyWriter out,
                          FacetBean facet)
                   throws java.io.IOException
Throws:
java.io.IOException

writeFacetGet

public void writeFacetGet(PrettyWriter out,
                          FacetBean facet)
                   throws java.io.IOException
Throws:
java.io.IOException

writeListenerMethods

public void writeListenerMethods(PrettyWriter out,
                                 ComponentBean component)
                          throws java.io.IOException
Specified by:
writeListenerMethods in interface ComponentGenerator
Throws:
java.io.IOException

writeListenerAdd

public void writeListenerAdd(PrettyWriter out,
                             EventBean event)
                      throws java.io.IOException
Throws:
java.io.IOException

writeListenerRemove

public void writeListenerRemove(PrettyWriter out,
                                EventBean event)
                         throws java.io.IOException
Throws:
java.io.IOException

writeListenersGet

public void writeListenersGet(PrettyWriter out,
                              EventBean event)
                       throws java.io.IOException
Throws:
java.io.IOException

writeStateManagementMethods

public abstract void writeStateManagementMethods(PrettyWriter out,
                                                 ComponentBean component)
                                          throws java.io.IOException
Specified by:
writeStateManagementMethods in interface ComponentGenerator
Throws:
java.io.IOException

writeOther

public void writeOther(PrettyWriter out,
                       ComponentBean component)
                throws java.io.IOException
Specified by:
writeOther in interface ComponentGenerator
Throws:
java.io.IOException

convertMultilineComment

protected java.lang.String convertMultilineComment(java.lang.String commentBody)

resolveType

protected static java.lang.String resolveType(java.lang.String className)


Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.