Package Torello.Java.Build
Class Printing
- java.lang.Object
-
- Torello.Java.Build.Printing
-
public class Printing extends java.lang.Object
Hi-Lited Source-Code:- View Here: Torello/Java/Build/Printing.java
- Open New Browser-Tab: Torello/Java/Build/Printing.java
File Size: 4,697 Bytes Line Count: 140 '\n' Characters Found
Stateless Class:This class neither contains any program-state, nor can it be instantiated. The@StaticFunctional
Annotation may also be called 'The Spaghetti Report'.Static-Functional
classes are, essentially, C-Styled Files, without any constructors or non-static member fields. It is a concept very similar to the Java-Bean's@Stateless
Annotation.
- 1 Constructor(s), 1 declared private, zero-argument constructor
- 3 Method(s), 3 declared static
- 10 Field(s), 10 declared static, 10 declared final
-
-
Field Summary
Fields Modifier and Type Field static String
TAR_JAR_DIVIDER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method static void
PLS(Appendable a, boolean unixColors)
static void
printFilesCount(ReadOnlyList<BuildPackage> packages, ArrayList<Integer> filesCount, Appendable logAndScreen)
-
-
-
Field Detail
-
TAR_JAR_DIVIDER
public static final java.lang.String TAR_JAR_DIVIDER
-
-
Method Detail
-
PLS
public static void PLS(java.lang.Appendable a, boolean unixColors) throws java.io.IOException
- Throws:
java.io.IOException
- Code:
- Exact Method Body:
a.append( "\n\n" + (unixColors ? BCYAN : "") + "*********************************************************************************\n" + "*********************************************************************************\n" + (unixColors ? RESET : "") + "\n\n" );
-
printFilesCount
public static void printFilesCount (ReadOnlyList<BuildPackage> packages, java.util.ArrayList<java.lang.Integer> filesCount, java.lang.Appendable logAndScreen) throws java.io.IOException
Prints out a list of file-counts to the screen and to the log.- Parameters:
packages
- a list of packages (as instances of classBuildPackage
). This list is a parallel data-set to'filesCount'
. Each element of'packages'
identifies exactly one package within the current build-processes. In the exact same list location in'filesCount'
there is an integer that specifies how many relevant files are contained in the package at any particular list index.filesCount
- A parallel list to'packages'
, this parameter contains the file count for each package listed.- Throws:
java.io.IOException
- See Also:
S01_JavaCompiler
,S02_JavaDoc
- Code:
- Exact Method Body:
double log10 = -1; double max = 0; for (Integer c : filesCount) if ((log10 = Math.log10(c)) > max) max = log10; final int spacing = 2 + ((int) max); int total = 0; for (int i=0; i < packages.size(); i++) { final int count = filesCount.get(i); total += count; logAndScreen.append( BRED + StringParse.rightSpacePad("" + count, spacing) + RESET + "'.java' Files: " + packages.get(i).fullName + '\n' ); } logAndScreen.append("\nTotal '.java' Files: " + BRED + total + RESET + "\n\n");
-
-