public final class ElementHelper extends Object
Modifier and Type | Method and Description |
---|---|
static List<Expression> |
toArguments(CompileEnvironment environment,
OperatorElement element,
ImportBuilder imports)
Creates arguments about operator element.
|
static List<Statement> |
toNodeConstructorStatements(CompileEnvironment environment,
OperatorElement element,
Expression builderExpression,
ImportBuilder imports)
Creates operator node constructor statements.
|
static Annotation |
toOperatorFactoryAnnotation(CompileEnvironment environment,
OperatorClass element,
ImportBuilder imports)
Returns annotation for the operator factory classes.
|
static Annotation |
toOperatorInfoAnnotation(CompileEnvironment environment,
OperatorElement element,
ImportBuilder imports)
Returns annotation for the operator factory methods.
|
static Type |
toParameterizedType(CompileEnvironment environment,
List<? extends TypeParameterElement> typeParameters,
Type rawNodeType,
ImportBuilder imports)
Creates a parameterized about operator element.
|
static List<FormalParameterDeclaration> |
toParameters(CompileEnvironment environment,
OperatorElement element,
ImportBuilder imports)
Creates type parameter declarations about operator element.
|
static List<TypeParameterDeclaration> |
toTypeParameters(CompileEnvironment environment,
List<? extends TypeParameterElement> typeParameters,
ImportBuilder imports)
Creates type parameters about operator element.
|
static boolean |
validate(CompileEnvironment environment,
ExecutableElement element,
OperatorDescription description)
Validates
OperatorDescription and raises errors when it is not valid. |
public static boolean validate(CompileEnvironment environment, ExecutableElement element, OperatorDescription description)
OperatorDescription
and raises errors when it is not valid.environment
- current environmentelement
- target elementdescription
- target descriptiontrue
if is valid, otherwise false
IllegalArgumentException
- if some parameters were null
public static List<TypeParameterDeclaration> toTypeParameters(CompileEnvironment environment, List<? extends TypeParameterElement> typeParameters, ImportBuilder imports)
environment
- current environmenttypeParameters
- target type parameter elementsimports
- import builderIllegalArgumentException
- if some parameters were null
public static Type toParameterizedType(CompileEnvironment environment, List<? extends TypeParameterElement> typeParameters, Type rawNodeType, ImportBuilder imports)
environment
- current environmenttypeParameters
- target type parameter elementsrawNodeType
- parameterization targetimports
- import builderIllegalArgumentException
- if some parameters were null
public static List<FormalParameterDeclaration> toParameters(CompileEnvironment environment, OperatorElement element, ImportBuilder imports)
environment
- current environmentelement
- target operator elementimports
- import builderIllegalArgumentException
- if some parameters were null
public static List<Expression> toArguments(CompileEnvironment environment, OperatorElement element, ImportBuilder imports)
environment
- current environmentelement
- target operator elementimports
- import builderIllegalArgumentException
- if some parameters were null
public static List<Statement> toNodeConstructorStatements(CompileEnvironment environment, OperatorElement element, Expression builderExpression, ImportBuilder imports)
environment
- current environmentelement
- target operator elementbuilderExpression
- the FlowElementBuilder
instance expressionimports
- import builderpublic static Annotation toOperatorFactoryAnnotation(CompileEnvironment environment, OperatorClass element, ImportBuilder imports)
environment
- current environmentelement
- target operator classimports
- import builderpublic static Annotation toOperatorInfoAnnotation(CompileEnvironment environment, OperatorElement element, ImportBuilder imports)
environment
- current environmentelement
- target operator elementimports
- import builderCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.