|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpt.compiler.helper.SourceHelper
public class SourceHelper
Constructor Summary | |
---|---|
SourceHelper()
|
Method Summary | ||
---|---|---|
static
|
findMatchingIndexes(T[] array,
T match)
Returns a list of all indexes of 'array' that equal 'match'. |
|
static
|
join(java.lang.Iterable<T> iterable)
Combines an iterable set of elements into a string with each element separated by the string ", ". |
|
static
|
join(java.lang.Iterable<T> iterable,
java.lang.String separator,
Func<java.lang.String,T> map)
Combines an iterable set of elements into a string with each element separated by the specified separator. |
|
static java.lang.String |
makeBoxedIfPrimitive(Type type)
Returns the given type as a boxed type if possible. |
|
static java.lang.String |
makeGeneric(java.lang.String type,
java.lang.String param)
Returns 'type' genericised with type 'param' as a string. |
|
static void |
printFormattedCode(SourcePrinter printer,
java.lang.String[] lines)
Prints code such that lines after a line ending with '{' are indented by one level and lines beginning with '}' are unindented by one level. |
|
static java.lang.String |
stripGenerics(java.lang.String type)
Completely unreliable way to strip generic parameters from the name of a type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SourceHelper()
Method Detail |
---|
public static <T> java.lang.String join(java.lang.Iterable<T> iterable, java.lang.String separator, Func<java.lang.String,T> map)
public static <T> java.lang.String join(java.lang.Iterable<T> iterable)
public static java.lang.String makeGeneric(java.lang.String type, java.lang.String param)
public static java.lang.String makeBoxedIfPrimitive(Type type)
public static java.lang.String stripGenerics(java.lang.String type)
public static <T> java.util.List<java.lang.Integer> findMatchingIndexes(T[] array, T match)
public static void printFormattedCode(SourcePrinter printer, java.lang.String[] lines)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |