class AssignExpr extends Expression {

    public enum Operator implements Stringable {

        ASSIGN("="),
        PLUS("+="),
        MINUS("-="),
        MULTIPLY("*="),
        DIVIDE("/="),
        BINARY_AND("&="),
        BINARY_OR("|="),
        XOR("^="),
        REMAINDER("%="),
        LEFT_SHIFT("<<="),
        SIGNED_RIGHT_SHIFT(">>="),
        UNSIGNED_RIGHT_SHIFT(">>>=");

        private final String codeRepresentation;

        Operator(String codeRepresentation) {
            this.codeRepresentation = codeRepresentation;
        }

        public String asString() {
            return codeRepresentation;
        }

        public Optional<BinaryExpr.Operator> toBinaryOperator() {
            switch(this) {
                case PLUS:
                    return Optional.of(BinaryExpr.Operator.PLUS);
                case MINUS:
                    return Optional.of(BinaryExpr.Operator.MINUS);
                case MULTIPLY:
                    return Optional.of(BinaryExpr.Operator.MULTIPLY);
                case DIVIDE:
                    return Optional.of(BinaryExpr.Operator.DIVIDE);
                case BINARY_AND:
                    return Optional.of(BinaryExpr.Operator.BINARY_AND);
                case BINARY_OR:
                    return Optional.of(BinaryExpr.Operator.BINARY_OR);
                case XOR:
                    return Optional.of(BinaryExpr.Operator.XOR);
                case REMAINDER:
                    return Optional.of(BinaryExpr.Operator.REMAINDER);
                case LEFT_SHIFT:
                    return Optional.of(BinaryExpr.Operator.LEFT_SHIFT);
                case SIGNED_RIGHT_SHIFT:
                    return Optional.of(BinaryExpr.Operator.SIGNED_RIGHT_SHIFT);
                case UNSIGNED_RIGHT_SHIFT:
                    return Optional.of(BinaryExpr.Operator.UNSIGNED_RIGHT_SHIFT);
                default:
                    return Optional.empty();
            }
        }
    }

    private Expression target;

    private Expression value;

    private Operator operator;

    public AssignExpr() {
        this(null, new NameExpr(), new StringLiteralExpr(), Operator.ASSIGN);
    }

    @AllFieldsConstructor
    public AssignExpr(Expression target, Expression value, Operator operator) {
        this(null, target, value, operator);
    }

    /**
     * This constructor is used by the parser and is considered private.
     */
    @Generated("com.github.javaparser.generator.core.node.MainConstructorGenerator")
    public AssignExpr(TokenRange tokenRange, Expression target, Expression value, Operator operator) {
        super(tokenRange);
        setTarget(target);
        setValue(value);
        setOperator(operator);
        customInitialization();
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.AcceptGenerator")
    public <R, A> R accept(final GenericVisitor<R, A> v, final A arg) {
        return v.visit(this, arg);
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.AcceptGenerator")
    public <A> void accept(final VoidVisitor<A> v, final A arg) {
        v.visit(this, arg);
    }

    @Generated("com.github.javaparser.generator.core.node.PropertyGenerator")
    public Operator getOperator() {
        return operator;
    }

    @Generated("com.github.javaparser.generator.core.node.PropertyGenerator")
    public Expression getTarget() {
        return target;
    }

    @Generated("com.github.javaparser.generator.core.node.PropertyGenerator")
    public Expression getValue() {
        return value;
    }

    @Generated("com.github.javaparser.generator.core.node.PropertyGenerator")
    public AssignExpr setOperator(final Operator operator) {
        assertNotNull(operator);
        if (operator == this.operator) {
            return this;
        }
        notifyPropertyChange(ObservableProperty.OPERATOR, this.operator, operator);
        this.operator = operator;
        return this;
    }

    @Generated("com.github.javaparser.generator.core.node.PropertyGenerator")
    public AssignExpr setTarget(final Expression target) {
        assertNotNull(target);
        if (target == this.target) {
            return this;
        }
        notifyPropertyChange(ObservableProperty.TARGET, this.target, target);
        if (this.target != null)
            this.target.setParentNode(null);
        this.target = target;
        setAsParentNodeOf(target);
        return this;
    }

    @Generated("com.github.javaparser.generator.core.node.PropertyGenerator")
    public AssignExpr setValue(final Expression value) {<FILL_FUNCTION_BODY>}

    @Override
    @Generated("com.github.javaparser.generator.core.node.CloneGenerator")
    public AssignExpr clone() {
        return (AssignExpr) accept(new CloneVisitor(), null);
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.GetMetaModelGenerator")
    public AssignExprMetaModel getMetaModel() {
        return JavaParserMetaModel.assignExprMetaModel;
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.ReplaceMethodGenerator")
    public boolean replace(Node node, Node replacementNode) {
        if (node == null) {
            return false;
        }
        if (node == target) {
            setTarget((Expression) replacementNode);
            return true;
        }
        if (node == value) {
            setValue((Expression) replacementNode);
            return true;
        }
        return super.replace(node, replacementNode);
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.TypeCastingGenerator")
    public boolean isAssignExpr() {
        return true;
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.TypeCastingGenerator")
    public AssignExpr asAssignExpr() {
        return this;
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.TypeCastingGenerator")
    public void ifAssignExpr(Consumer<AssignExpr> action) {
        action.accept(this);
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.TypeCastingGenerator")
    public Optional<AssignExpr> toAssignExpr() {
        return Optional.of(this);
    }

    /*
     * Returns true if the expression is an assignment context
     * https://docs.oracle.com/javase/specs/jls/se8/html/jls-5.html#jls-5.2
     * 5.2. Assignment Contexts: Assignment contexts allow the value of an expression to be assigned (§15.26) to a variable;...
     */
    @Override
    protected boolean isAssignmentContext() {
        return true;
    }
}

        assertNotNull(value);
        if (value == this.value) {
            return this;
        }
        notifyPropertyChange(ObservableProperty.VALUE, this.value, value);
        if (this.value != null)
            this.value.setParentNode(null);
        this.value = value;
        setAsParentNodeOf(value);
        return this;
    
<methods>public void <init>() ,public void <init>(com.github.javaparser.TokenRange) ,public final boolean appearsInAssignmentContext() ,public final boolean appearsInInvocationContext() ,public com.github.javaparser.ast.expr.AnnotationExpr asAnnotationExpr() ,public com.github.javaparser.ast.expr.ArrayAccessExpr asArrayAccessExpr() ,public com.github.javaparser.ast.expr.ArrayCreationExpr asArrayCreationExpr() ,public com.github.javaparser.ast.expr.ArrayInitializerExpr asArrayInitializerExpr() ,public com.github.javaparser.ast.expr.AssignExpr asAssignExpr() ,public com.github.javaparser.ast.expr.BinaryExpr asBinaryExpr() ,public com.github.javaparser.ast.expr.BooleanLiteralExpr asBooleanLiteralExpr() ,public com.github.javaparser.ast.expr.CastExpr asCastExpr() ,public com.github.javaparser.ast.expr.CharLiteralExpr asCharLiteralExpr() ,public com.github.javaparser.ast.expr.ClassExpr asClassExpr() ,public com.github.javaparser.ast.expr.ConditionalExpr asConditionalExpr() ,public com.github.javaparser.ast.expr.DoubleLiteralExpr asDoubleLiteralExpr() ,public com.github.javaparser.ast.expr.EnclosedExpr asEnclosedExpr() ,public com.github.javaparser.ast.expr.FieldAccessExpr asFieldAccessExpr() ,public com.github.javaparser.ast.expr.InstanceOfExpr asInstanceOfExpr() ,public com.github.javaparser.ast.expr.IntegerLiteralExpr asIntegerLiteralExpr() ,public com.github.javaparser.ast.expr.LambdaExpr asLambdaExpr() ,public com.github.javaparser.ast.expr.LiteralExpr asLiteralExpr() ,public com.github.javaparser.ast.expr.LiteralStringValueExpr asLiteralStringValueExpr() ,public com.github.javaparser.ast.expr.LongLiteralExpr asLongLiteralExpr() ,public com.github.javaparser.ast.expr.MarkerAnnotationExpr asMarkerAnnotationExpr() ,public com.github.javaparser.ast.expr.MethodCallExpr asMethodCallExpr() ,public com.github.javaparser.ast.expr.MethodReferenceExpr asMethodReferenceExpr() ,public com.github.javaparser.ast.expr.NameExpr asNameExpr() ,public com.github.javaparser.ast.expr.NormalAnnotationExpr asNormalAnnotationExpr() ,public com.github.javaparser.ast.expr.NullLiteralExpr asNullLiteralExpr() ,public com.github.javaparser.ast.expr.ObjectCreationExpr asObjectCreationExpr() ,public com.github.javaparser.ast.expr.PatternExpr asPatternExpr() ,public com.github.javaparser.ast.expr.SingleMemberAnnotationExpr asSingleMemberAnnotationExpr() ,public com.github.javaparser.ast.expr.StringLiteralExpr asStringLiteralExpr() ,public com.github.javaparser.ast.expr.SuperExpr asSuperExpr() ,public com.github.javaparser.ast.expr.SwitchExpr asSwitchExpr() ,public com.github.javaparser.ast.expr.TextBlockLiteralExpr asTextBlockLiteralExpr() ,public com.github.javaparser.ast.expr.ThisExpr asThisExpr() ,public com.github.javaparser.ast.expr.TypeExpr asTypeExpr() ,public com.github.javaparser.ast.expr.UnaryExpr asUnaryExpr() ,public com.github.javaparser.ast.expr.VariableDeclarationExpr asVariableDeclarationExpr() ,public com.github.javaparser.resolution.types.ResolvedType calculateResolvedType() ,public com.github.javaparser.ast.expr.Expression clone() ,public final boolean elidesTypeArguments() ,public com.github.javaparser.metamodel.ExpressionMetaModel getMetaModel() ,public void ifAnnotationExpr(Consumer<com.github.javaparser.ast.expr.AnnotationExpr>) ,public void ifArrayAccessExpr(Consumer<com.github.javaparser.ast.expr.ArrayAccessExpr>) ,public void ifArrayCreationExpr(Consumer<com.github.javaparser.ast.expr.ArrayCreationExpr>) ,public void ifArrayInitializerExpr(Consumer<com.github.javaparser.ast.expr.ArrayInitializerExpr>) ,public void ifAssignExpr(Consumer<com.github.javaparser.ast.expr.AssignExpr>) ,public void ifBinaryExpr(Consumer<com.github.javaparser.ast.expr.BinaryExpr>) ,public void ifBooleanLiteralExpr(Consumer<com.github.javaparser.ast.expr.BooleanLiteralExpr>) ,public void ifCastExpr(Consumer<com.github.javaparser.ast.expr.CastExpr>) ,public void ifCharLiteralExpr(Consumer<com.github.javaparser.ast.expr.CharLiteralExpr>) ,public void ifClassExpr(Consumer<com.github.javaparser.ast.expr.ClassExpr>) ,public void ifConditionalExpr(Consumer<com.github.javaparser.ast.expr.ConditionalExpr>) ,public void ifDoubleLiteralExpr(Consumer<com.github.javaparser.ast.expr.DoubleLiteralExpr>) ,public void ifEnclosedExpr(Consumer<com.github.javaparser.ast.expr.EnclosedExpr>) ,public void ifFieldAccessExpr(Consumer<com.github.javaparser.ast.expr.FieldAccessExpr>) ,public void ifInstanceOfExpr(Consumer<com.github.javaparser.ast.expr.InstanceOfExpr>) ,public void ifIntegerLiteralExpr(Consumer<com.github.javaparser.ast.expr.IntegerLiteralExpr>) ,public void ifLambdaExpr(Consumer<com.github.javaparser.ast.expr.LambdaExpr>) ,public void ifLiteralExpr(Consumer<com.github.javaparser.ast.expr.LiteralExpr>) ,public void ifLiteralStringValueExpr(Consumer<com.github.javaparser.ast.expr.LiteralStringValueExpr>) ,public void ifLongLiteralExpr(Consumer<com.github.javaparser.ast.expr.LongLiteralExpr>) ,public void ifMarkerAnnotationExpr(Consumer<com.github.javaparser.ast.expr.MarkerAnnotationExpr>) ,public void ifMethodCallExpr(Consumer<com.github.javaparser.ast.expr.MethodCallExpr>) ,public void ifMethodReferenceExpr(Consumer<com.github.javaparser.ast.expr.MethodReferenceExpr>) ,public void ifNameExpr(Consumer<com.github.javaparser.ast.expr.NameExpr>) ,public void ifNormalAnnotationExpr(Consumer<com.github.javaparser.ast.expr.NormalAnnotationExpr>) ,public void ifNullLiteralExpr(Consumer<com.github.javaparser.ast.expr.NullLiteralExpr>) ,public void ifObjectCreationExpr(Consumer<com.github.javaparser.ast.expr.ObjectCreationExpr>) ,public void ifPatternExpr(Consumer<com.github.javaparser.ast.expr.PatternExpr>) ,public void ifSingleMemberAnnotationExpr(Consumer<com.github.javaparser.ast.expr.SingleMemberAnnotationExpr>) ,public void ifStringLiteralExpr(Consumer<com.github.javaparser.ast.expr.StringLiteralExpr>) ,public void ifSuperExpr(Consumer<com.github.javaparser.ast.expr.SuperExpr>) ,public void ifSwitchExpr(Consumer<com.github.javaparser.ast.expr.SwitchExpr>) ,public void ifTextBlockLiteralExpr(Consumer<com.github.javaparser.ast.expr.TextBlockLiteralExpr>) ,public void ifThisExpr(Consumer<com.github.javaparser.ast.expr.ThisExpr>) ,public void ifTypeExpr(Consumer<com.github.javaparser.ast.expr.TypeExpr>) ,public void ifUnaryExpr(Consumer<com.github.javaparser.ast.expr.UnaryExpr>) ,public void ifVariableDeclarationExpr(Consumer<com.github.javaparser.ast.expr.VariableDeclarationExpr>) ,public boolean isAnnotationExpr() ,public boolean isArrayAccessExpr() ,public boolean isArrayCreationExpr() ,public boolean isArrayInitializerExpr() ,public boolean isAssignExpr() ,public boolean isBinaryExpr() ,public boolean isBooleanLiteralExpr() ,public boolean isCastExpr() ,public boolean isCharLiteralExpr() ,public boolean isClassExpr() ,public boolean isConditionalExpr() ,public boolean isDoubleLiteralExpr() ,public boolean isEnclosedExpr() ,public boolean isFieldAccessExpr() ,public boolean isInstanceOfExpr() ,public boolean isIntegerLiteralExpr() ,public boolean isLambdaExpr() ,public boolean isLiteralExpr() ,public boolean isLiteralStringValueExpr() ,public boolean isLongLiteralExpr() ,public boolean isMarkerAnnotationExpr() ,public boolean isMethodCallExpr() ,public boolean isMethodReferenceExpr() ,public boolean isNameExpr() ,public boolean isNormalAnnotationExpr() ,public boolean isNullLiteralExpr() ,public boolean isObjectCreationExpr() ,public boolean isPatternExpr() ,public boolean isPolyExpression() ,public boolean isQualified() ,public boolean isSingleMemberAnnotationExpr() ,public boolean isStandaloneExpression() ,public boolean isStringLiteralExpr() ,public boolean isSuperExpr() ,public boolean isSwitchExpr() ,public boolean isTextBlockLiteralExpr() ,public boolean isThisExpr() ,public boolean isTypeExpr() ,public boolean isUnaryExpr() ,public boolean isVariableDeclarationExpr() ,public Optional<com.github.javaparser.ast.expr.AnnotationExpr> toAnnotationExpr() ,public Optional<com.github.javaparser.ast.expr.ArrayAccessExpr> toArrayAccessExpr() ,public Optional<com.github.javaparser.ast.expr.ArrayCreationExpr> toArrayCreationExpr() ,public Optional<com.github.javaparser.ast.expr.ArrayInitializerExpr> toArrayInitializerExpr() ,public Optional<com.github.javaparser.ast.expr.AssignExpr> toAssignExpr() ,public Optional<com.github.javaparser.ast.expr.BinaryExpr> toBinaryExpr() ,public Optional<com.github.javaparser.ast.expr.BooleanLiteralExpr> toBooleanLiteralExpr() ,public Optional<com.github.javaparser.ast.expr.CastExpr> toCastExpr() ,public Optional<com.github.javaparser.ast.expr.CharLiteralExpr> toCharLiteralExpr() ,public Optional<com.github.javaparser.ast.expr.ClassExpr> toClassExpr() ,public Optional<com.github.javaparser.ast.expr.ConditionalExpr> toConditionalExpr() ,public Optional<com.github.javaparser.ast.expr.DoubleLiteralExpr> toDoubleLiteralExpr() ,public Optional<com.github.javaparser.ast.expr.EnclosedExpr> toEnclosedExpr() ,public Optional<com.github.javaparser.ast.expr.FieldAccessExpr> toFieldAccessExpr() ,public Optional<com.github.javaparser.ast.expr.InstanceOfExpr> toInstanceOfExpr() ,public Optional<com.github.javaparser.ast.expr.IntegerLiteralExpr> toIntegerLiteralExpr() ,public Optional<com.github.javaparser.ast.expr.LambdaExpr> toLambdaExpr() ,public Optional<com.github.javaparser.ast.expr.LiteralExpr> toLiteralExpr() ,public Optional<com.github.javaparser.ast.expr.LiteralStringValueExpr> toLiteralStringValueExpr() ,public Optional<com.github.javaparser.ast.expr.LongLiteralExpr> toLongLiteralExpr() ,public Optional<com.github.javaparser.ast.expr.MarkerAnnotationExpr> toMarkerAnnotationExpr() ,public Optional<com.github.javaparser.ast.expr.MethodCallExpr> toMethodCallExpr() ,public Optional<com.github.javaparser.ast.expr.MethodReferenceExpr> toMethodReferenceExpr() ,public Optional<com.github.javaparser.ast.expr.NameExpr> toNameExpr() ,public Optional<com.github.javaparser.ast.expr.NormalAnnotationExpr> toNormalAnnotationExpr() ,public Optional<com.github.javaparser.ast.expr.NullLiteralExpr> toNullLiteralExpr() ,public Optional<com.github.javaparser.ast.expr.ObjectCreationExpr> toObjectCreationExpr() ,public Optional<com.github.javaparser.ast.expr.PatternExpr> toPatternExpr() ,public Optional<com.github.javaparser.ast.expr.SingleMemberAnnotationExpr> toSingleMemberAnnotationExpr() ,public Optional<com.github.javaparser.ast.expr.StringLiteralExpr> toStringLiteralExpr() ,public Optional<com.github.javaparser.ast.expr.SuperExpr> toSuperExpr() ,public Optional<com.github.javaparser.ast.expr.SwitchExpr> toSwitchExpr() ,public Optional<com.github.javaparser.ast.expr.TextBlockLiteralExpr> toTextBlockLiteralExpr() ,public Optional<com.github.javaparser.ast.expr.ThisExpr> toThisExpr() ,public Optional<com.github.javaparser.ast.expr.TypeExpr> toTypeExpr() ,public Optional<com.github.javaparser.ast.expr.UnaryExpr> toUnaryExpr() ,public Optional<com.github.javaparser.ast.expr.VariableDeclarationExpr> toVariableDeclarationExpr() <variables>public static final Function<com.github.javaparser.ast.expr.Expression,com.github.javaparser.ast.expr.Expression> EXCLUDE_ENCLOSED_EXPR,public static final Predicate<com.github.javaparser.ast.Node> IS_NOT_ENCLOSED_EXPR