@Data public class CodeRule extends AbstractRule implements IParameterlessFunctionRule<CharSequence>
| Modifier and Type | Field and Description |
|---|---|
protected AnnotationExtensions |
annotationExtensions |
_elementsExtensions, _eLSupport, _generateClassContext, _messageCollector, _ruleFactory, _ruleUtils, _typesExtensions, _typesRegistry| Constructor and Description |
|---|
CodeRule(AnnotationMirror metaAnnotation,
Element template,
String avPrefix,
String errorValue) |
CodeRule(AnnotationMirror metaAnnotation,
String avPrefix) |
| Modifier and Type | Method and Description |
|---|---|
CharSequence |
apply() |
CharSequence |
apply(Object p) |
CharSequence |
code()
Gets the code as CharSequence.
|
static org.eclipse.xtext.xbase.lib.Functions.Function1<? super GenElement,? extends CodeBody> |
createCodeBodyRule(org.eclipse.xtext.xbase.lib.Functions.Function1<? super GenElement,? extends CharSequence> codeRule,
org.eclipse.xtext.xbase.lib.Functions.Function1<? super CharSequence,? extends CharSequence> defaultFragments) |
boolean |
equals(Object obj) |
String |
getAfterExpr() |
static CodeBody |
getAsCodeBody(GenElement genElement,
CodeRule cr)
Gets the code as a closure usable in generated methods, constructors and fields.
|
static CodeBody |
getAsCodeBody(GenElement genElement,
org.eclipse.xtext.xbase.lib.Functions.Function1<? super GenElement,? extends CharSequence> cr,
org.eclipse.xtext.xbase.lib.Functions.Function1<? super CharSequence,? extends CharSequence> defaultFragments) |
String |
getBeforeExpr() |
List<CaseRule<String>> |
getBodyCases() |
String |
getBodyExpr() |
org.eclipse.xtext.xbase.lib.Functions.Function1<? super CharSequence,? extends CharSequence> |
getDefaultFragmentsRule() |
String |
getEmptyExpr() |
String |
getErrorValue() |
List<DeclaredType> |
getImports() |
String |
getIteratorExpr() |
String |
getIteratorLang() |
String |
getLang() |
String |
getLINE_DELIM() |
String |
getSeparator() |
Element |
getTemplate() |
int |
hashCode() |
boolean |
isIndentAfterLinebreak() |
boolean |
isLinebreak() |
String |
toString() |
static CharSequence |
withLinebreak(CharSequence cs) |
static CharSequence |
withLinebreak(CharSequence cs,
boolean linebreak) |
getMetaAnnotation, getMetaElement, getRuleCreationException, inRule, registerMetaTypeElement, throwRuleCreationException, throwRuleCreationExceptionclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetMetaAnnotation, getMetaElement@Extension protected final transient AnnotationExtensions annotationExtensions
public CodeRule(AnnotationMirror metaAnnotation, String avPrefix)
public CodeRule(AnnotationMirror metaAnnotation, Element template, String avPrefix, String errorValue)
public static CodeBody getAsCodeBody(GenElement genElement, CodeRule cr)
public static CodeBody getAsCodeBody(GenElement genElement, org.eclipse.xtext.xbase.lib.Functions.Function1<? super GenElement,? extends CharSequence> cr, org.eclipse.xtext.xbase.lib.Functions.Function1<? super CharSequence,? extends CharSequence> defaultFragments)
public static org.eclipse.xtext.xbase.lib.Functions.Function1<? super GenElement,? extends CodeBody> createCodeBodyRule(org.eclipse.xtext.xbase.lib.Functions.Function1<? super GenElement,? extends CharSequence> codeRule, org.eclipse.xtext.xbase.lib.Functions.Function1<? super CharSequence,? extends CharSequence> defaultFragments)
public CharSequence code()
public static CharSequence withLinebreak(CharSequence cs)
public static CharSequence withLinebreak(CharSequence cs, boolean linebreak)
public CharSequence apply()
apply in interface org.eclipse.xtext.xbase.lib.Functions.Function0<CharSequence>public CharSequence apply(Object p)
apply in interface org.eclipse.xtext.xbase.lib.Functions.Function1<Object,CharSequence>@Pure public int hashCode()
hashCode in class AbstractRule@Pure public boolean equals(Object obj)
equals in class AbstractRule@Pure public String toString()
toString in class AbstractRule@Pure public Element getTemplate()
@Pure public List<DeclaredType> getImports()
@Pure public String getIteratorExpr()
@Pure public String getIteratorLang()
@Pure public String getBodyExpr()
@Pure public String getLang()
@Pure public String getBeforeExpr()
@Pure public String getAfterExpr()
@Pure public String getSeparator()
@Pure public String getEmptyExpr()
@Pure public String getErrorValue()
@Pure public org.eclipse.xtext.xbase.lib.Functions.Function1<? super CharSequence,? extends CharSequence> getDefaultFragmentsRule()
@Pure public boolean isLinebreak()
@Pure public boolean isIndentAfterLinebreak()
@Pure public String getLINE_DELIM()
Copyright © 2018. All rights reserved.