Package com.strobel.decompiler.languages

Examples of com.strobel.decompiler.languages.TextLocation


        this(TextLocation.EMPTY);
    }

    public NullReferenceExpression(final TextLocation startLocation) {
        _startLocation = VerifyArgument.notNull(startLocation, "startLocation");
        _endLocation = new TextLocation(startLocation.line(), startLocation.column() + NULL_TEXT.length());
    }
View Full Code Here


        return _endLocation;
    }

    public void setStartLocation(final TextLocation startLocation) {
        _startLocation = VerifyArgument.notNull(startLocation, "startLocation");
        _endLocation = new TextLocation(startLocation.line(), startLocation.column() + NULL_TEXT.length());
    }
View Full Code Here

        _literalValue = literalValue != null ? literalValue : StringUtilities.EMPTY;
    }

    @Override
    public TextLocation getStartLocation() {
        final TextLocation startLocation = _startLocation;
        return startLocation != null ? startLocation : TextLocation.EMPTY;
    }
View Full Code Here

    }

    @Override
    public TextLocation getEndLocation() {
        if (_endLocation == null) {
            final TextLocation startLocation = getStartLocation();
            if (_literalValue == null) {
                return startLocation;
            }
            _endLocation = new TextLocation(_startLocation.line(), _startLocation.column() + _literalValue.length());
        }
        return _endLocation;
    }
View Full Code Here

        return null;
    }

    @Override
    public Void visitJavaTokenNode(final JavaTokenNode node, final Void _) {
        node.setStartLocation(new TextLocation(output.getRow(), output.getColumn()));
        if (node instanceof JavaModifierToken) {
            final JavaModifierToken modifierToken = (JavaModifierToken) node;
            startNode(modifierToken);
            writeKeyword(JavaModifierToken.getModifierName(modifierToken.getModifier()));
            endNode(modifierToken);
View Full Code Here

        return null;
    }

    @Override
    public Void visitIdentifier(final Identifier node, final Void _) {
        node.setStartLocation(new TextLocation(output.getRow(), output.getColumn()));
        startNode(node);
        writeIdentifier(node.getName());
        endNode(node);
        return null;
    }
View Full Code Here

        return null;
    }

    @Override
    public Void visitNullReferenceExpression(final NullReferenceExpression node, final Void _) {
        node.setStartLocation(new TextLocation(output.getRow(), output.getColumn()));
        startNode(node);
        writeKeyword("null", node.getRole());
        endNode(node);
        return null;
    }
View Full Code Here

        return null;
    }

    @Override
    public Void visitThisReferenceExpression(final ThisReferenceExpression node, final Void _) {
        node.setStartLocation(new TextLocation(output.getRow(), output.getColumn()));
        startNode(node);

        final Expression target = node.getTarget();

        if (target != null && !target.isNull()) {
View Full Code Here

        return null;
    }

    @Override
    public Void visitSuperReferenceExpression(final SuperReferenceExpression node, final Void _) {
        node.setStartLocation(new TextLocation(output.getRow(), output.getColumn()));
        startNode(node);

        final Expression target = node.getTarget();

        if (target != null && !target.isNull()) {
View Full Code Here

        return null;
    }

    @Override
    public Void visitPrimitiveExpression(final PrimitiveExpression node, final Void _) {
        node.setStartLocation(new TextLocation(output.getRow(), output.getColumn()));
        startNode(node);
        if (!StringUtilities.isNullOrEmpty(node.getLiteralValue())) {
            formatter.writeLiteral(node.getLiteralValue());
        }
        else {
View Full Code Here

TOP

Related Classes of com.strobel.decompiler.languages.TextLocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.