Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.google.code.joto;
  
  import static com.google.code.joto.ReverseEngineerHelper.getBestConstructorInvocationCodeForObject;
  import static com.google.code.joto.ReverseEngineerHelper.getTypeAsString;
  import static com.google.code.joto.ReverseEngineerHelper.removeDashesAndFirstCharInUpperCase;
  
  import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 

Author(s):
SG0203967
 
 public class ReverseEngineerData
 {
 
     public ReverseEngineerData()
     {
         thisnullnullnull );
     }
 
     public ReverseEngineerDatafinal Set<ClassclassesToImport )
     {
         thisclassesToImportnullnull );
     }
 
     public ReverseEngineerDatafinal Set<ClassclassesToImportfinal StringBuilder sb,
                                                  List<CustomProcessorlistOfProcessors )
     {
         this. = classesToImport == null ? new HashSet<Class>() : classesToImport;
         this. = sb == null ? new StringBuilder() : sb;
         this. = listOfProcessors == null ? . : listOfProcessors;
 
     }
 
     public ReverseEngineerDataList<CustomProcessorlistOfProcessors )
     {
         thisnullnulllistOfProcessors );
     }

    
objectsAlreadyProcessed
 
     public final Set<ObjectobjectsAlreadyProcessed = new IdentitySet<Object>();

    
classesAlreadyDeclared
 
     public final Set<StringclassesAlreadyDeclared = new HashSet<String>();

    
classesToImport
 
     private final Set<ClassclassesToImport;

    
sb
 
     public final StringBuilder sb;

    
listOfProcessors
 
     public final List<CustomProcessorlistOfProcessors;
 
     public void concatObject... partsToConcat )
     {
         concatthispartsToConcat );
     }
 
     public static void concatReverseEngineerData sharedDataObject... partsToConcat )
     {
         concatsharedData.sbpartsToConcat );
     }
 
     static void concatStringBuilder sbObject... partsToConcat )
     {
         for ( Object part : partsToConcat )
         {
             sb.appendpart );
         }
     }
 
     public static void writeCreatorFooterReverseEngineerData sharedData )
     {
         concatsharedData"}}.create()" );
     }
 
     public static void writeCreatorHeaderReverseEngineerData sharedDataObject objectToProcess )
     {
         concatsharedData"new Creator<"getTypeAsStringobjectToProcess ), ">(){ \npublic ",
                 getTypeAsStringobjectToProcess ), " create() {\n" );
     }
 
                                                                String variableNameObject objectToProcess )
     {
 
         String variableType = getTypeAsStringobjectToProcess );
         concatsharedDatavariableType" "variableName" = ",
                 getBestConstructorInvocationCodeForObjectobjectToProcess ), ";\n" );
         return variableName;
     }
 
     public static void writeReturnStatementReverseEngineerData sharedDataString variableName )
    {
        concatsharedData"return "variableName";\n" );
    }
    public static void setVarWithValueStartReverseEngineerData sharedDataString variableName,
                                             Field field )
    {
        String propertyName = removeDashesAndFirstCharInUpperCasefield.getName() );
        String setterName = "set" + propertyName;
        setVarWithValueStartsharedDatavariableNamesetterName );
    }
    public static void setVarWithValueStartReverseEngineerData sharedDataString variableName,
                                              String setterMethodName )
    {
        concatsharedDatavariableName"."setterMethodName"(" );
    }
    public static void setVarWithValueEndReverseEngineerData sharedData )
    {
        concatsharedData");\n" );
    }
    public static void setVarWithValueStringBuilder sbString varNameField fieldString valueToSet )
    {
        String propertyName = removeDashesAndFirstCharInUpperCasefield.getName() );
        concatsbvarName".set"propertyName"("valueToSet");\n" );
    }

    

Parameters:
clazz
    public void addClassToImportClass clazz )
    {
        .addclazz );
    }

    

Parameters:
classes
    public void addClassesToImportSet<Classclasses )
    {
        .addAllclasses );
    }

    

Returns:
the classesToImport
    public Set<ClassgetClassesToImport()
    {
        return Collections.unmodifiableSet );
    }
New to GrepCode? Check out our FAQ X