@Data public class CaseRule<T> extends AbstractRule implements org.eclipse.xtext.xbase.lib.Functions.Function0<T>, ICodeFragmentRule
_elementsExtensions, _eLSupport, _generateClassContext, _messageCollector, _ruleFactory, _ruleUtils, _typesExtensions, _typesRegistry| Constructor and Description |
|---|
CaseRule(AnnotationMirror metaAnnotation,
Element metaElement,
Class<? extends T> type,
boolean isDefaultCase) |
| Modifier and Type | Method and Description |
|---|---|
T |
apply() |
CharSequence |
code() |
boolean |
equals(Object obj) |
static <E> CaseRule<E> |
findFirstMatching(List<CaseRule<E>> caseRules) |
CodeFragmentRule |
getCodeFragmentRule() |
org.eclipse.xtext.xbase.lib.Functions.Function0<? extends Boolean> |
getConditionRule() |
List<TypeElement> |
getOtherAnnotationTypes() |
ExpressionOrFunctionCallRule<T> |
getValueRule() |
int |
hashCode() |
Boolean |
shallBeApplied()
The key of the returned pair is true if the condition evaluated to true.
|
CharSequence |
surround(CharSequence surrounded) |
String |
toString() |
getMetaAnnotation, getMetaElement, getRuleCreationException, inRule, registerMetaTypeElement, throwRuleCreationException, throwRuleCreationExceptionpublic CaseRule(AnnotationMirror metaAnnotation, Element metaElement, Class<? extends T> type, boolean isDefaultCase)
public Boolean shallBeApplied()
public T apply()
apply in interface org.eclipse.xtext.xbase.lib.Functions.Function0<T>public CodeFragmentRule getCodeFragmentRule()
public CharSequence code()
code in interface ICodeFragmentRulepublic CharSequence surround(CharSequence surrounded)
surround in interface ICodeFragmentRule@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 org.eclipse.xtext.xbase.lib.Functions.Function0<? extends Boolean> getConditionRule()
@Pure public ExpressionOrFunctionCallRule<T> getValueRule()
@Pure public List<TypeElement> getOtherAnnotationTypes()
Copyright © 2018. All rights reserved.