public class CGUtil
extends java.lang.Object
Constructor and Description |
---|
CGUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
compressJDTannotations(java.lang.String classFileContent)
Simplify org.eclipse.jdt.annotation references that unnecessarily use long firm within a long firm.
|
static CGParameter |
createCGParameter(java.lang.String name,
CGTypeId typeId) |
static CGClass |
getContainingClass(CGElement cgExpression) |
static CGValuedElement |
getInit(CGTuplePart cgTuplePart) |
static CGValuedElement |
getInit(CGVariable cgVariable) |
static java.lang.Iterable<CGTuplePart> |
getParts(CGTupleExp cgTupleExp) |
static CGValuedElement |
getReferredConstant(CGConstantExp cgConstantExp) |
static CGValuedElement |
getReferredVariable(CGVariableExp cgVariableExp) |
static boolean |
isInlinedId(ElementId elementId) |
static java.lang.Boolean |
isKindOf(CGValuedElement cgValue,
CGExecutorType executorType) |
static CGValuedElement |
replace(CGValuedElement oldElement,
CGValuedElement newElement)
Replace oldElement by newElement and return oldElement which is orphaned by the replacement.
|
static java.lang.String |
trimLines(java.lang.String classFileContent)
Trim trailing spaces from lines.
|
static void |
wrap(CGCallExp wrapExp,
CGValuedElement wrappedExp)
Use wrapExp to wrap wrappedExp.
|
@NonNull public static java.lang.String compressJDTannotations(@NonNull java.lang.String classFileContent)
@NonNull public static CGParameter createCGParameter(@NonNull java.lang.String name, @NonNull CGTypeId typeId)
@Nullable public static CGClass getContainingClass(@NonNull CGElement cgExpression)
@NonNull public static CGValuedElement getInit(@NonNull CGTuplePart cgTuplePart)
@NonNull public static CGValuedElement getInit(@NonNull CGVariable cgVariable)
public static java.lang.Iterable<CGTuplePart> getParts(@NonNull CGTupleExp cgTupleExp)
@NonNull public static CGValuedElement getReferredConstant(@NonNull CGConstantExp cgConstantExp)
@NonNull public static CGValuedElement getReferredVariable(@NonNull CGVariableExp cgVariableExp)
public static boolean isInlinedId(@NonNull ElementId elementId)
@Nullable public static java.lang.Boolean isKindOf(@NonNull CGValuedElement cgValue, @NonNull CGExecutorType executorType)
@NonNull public static CGValuedElement replace(@NonNull CGValuedElement oldElement, @NonNull CGValuedElement newElement)
@NonNull public static java.lang.String trimLines(@NonNull java.lang.String classFileContent)
public static void wrap(@NonNull CGCallExp wrapExp, @NonNull CGValuedElement wrappedExp)