Class GeneratorUtils
java.lang.Object
com.oracle.truffle.dsl.processor.generator.GeneratorUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddBoundaryOrTransferToInterpreter(CodeExecutableElement method, CodeTreeBuilder builder) static voidaddGeneratedBy(ProcessorContext context, CodeTypeElement generatedType, TypeElement generatedByType) static voidaddOverride(CodeExecutableElement method) static voidaddThrownExceptions(CodeExecutableElement executable, List<? extends TypeMirror> thrownTypes) static CodeTypeElementcreateClass(Template sourceModel, TemplateMethod sourceMethod, Set<Modifier> modifiers, String simpleName, TypeMirror superType) static CodeExecutableElementcreateConstructorUsingFields(Set<Modifier> modifiers, CodeTypeElement clazz) static CodeExecutableElementcreateConstructorUsingFields(Set<Modifier> modifiers, CodeTypeElement clazz, ExecutableElement superConstructor) static CodeExecutableElementcreateConstructorUsingFields(Set<Modifier> modifiers, CodeTypeElement clazz, ExecutableElement superConstructor, Set<String> ignoreFields) static CodeExecutableElementcreateCopyConstructorUsingFields(Set<Modifier> modifiers, CodeTypeElement clazz, Set<String> ignoreFields) static CodeExecutableElementcreateCopyConstructorUsingFields(Set<Modifier> modifiers, CodeTypeElement clazz, ExecutableElement superConstructor, Set<String> ignoreFields) static CodeTreestatic CodeTreecreateShouldNotReachHere(CodeTree causeExpression) static CodeTreecreateShouldNotReachHere(String message) static CodeTreestatic voidmarkUnsafeAccessed(CodeElement<?> element) static voidmergeSuppressWarnings(CodeElement<?> element, String... addWarnings) static CodeExecutableElementoverride(DeclaredType type, String methodName) static voidpopEncapsulatingNode(CodeTreeBuilder builder) static voidpushEncapsulatingNode(CodeTreeBuilder builder, CodeTree nodeRef)
-
Constructor Details
-
GeneratorUtils
public GeneratorUtils()
-
-
Method Details
-
pushEncapsulatingNode
-
popEncapsulatingNode
-
createTransferToInterpreterAndInvalidate
-
createShouldNotReachHere
-
createShouldNotReachHere
-
createShouldNotReachHere
-
createConstructorUsingFields
public static CodeExecutableElement createConstructorUsingFields(Set<Modifier> modifiers, CodeTypeElement clazz) -
addBoundaryOrTransferToInterpreter
public static void addBoundaryOrTransferToInterpreter(CodeExecutableElement method, CodeTreeBuilder builder) -
addOverride
-
markUnsafeAccessed
-
mergeSuppressWarnings
-
createConstructorUsingFields
public static CodeExecutableElement createConstructorUsingFields(Set<Modifier> modifiers, CodeTypeElement clazz, ExecutableElement superConstructor) -
createConstructorUsingFields
public static CodeExecutableElement createConstructorUsingFields(Set<Modifier> modifiers, CodeTypeElement clazz, ExecutableElement superConstructor, Set<String> ignoreFields) -
createCopyConstructorUsingFields
public static CodeExecutableElement createCopyConstructorUsingFields(Set<Modifier> modifiers, CodeTypeElement clazz, Set<String> ignoreFields) -
createCopyConstructorUsingFields
public static CodeExecutableElement createCopyConstructorUsingFields(Set<Modifier> modifiers, CodeTypeElement clazz, ExecutableElement superConstructor, Set<String> ignoreFields) -
createClass
public static CodeTypeElement createClass(Template sourceModel, TemplateMethod sourceMethod, Set<Modifier> modifiers, String simpleName, TypeMirror superType) -
addGeneratedBy
public static void addGeneratedBy(ProcessorContext context, CodeTypeElement generatedType, TypeElement generatedByType) -
override
-
addThrownExceptions
public static void addThrownExceptions(CodeExecutableElement executable, List<? extends TypeMirror> thrownTypes)
-