Examples of PlainTextOutput


Examples of com.strobel.decompiler.PlainTextOutput

        return result;
    }

    @Override
    public final String toString() {
        final PlainTextOutput writer = new PlainTextOutput();
        DecompilerHelpers.writeFrame(writer, this);
        return writer.toString();
    }
View Full Code Here

Examples of com.strobel.decompiler.PlainTextOutput

        private static void dumpHandlerNodes(
            final ExceptionHandler handler,
            final List<ControlFlowNode> tryNodes,
            final List<ControlFlowNode> handlerNodes) {

            final ITextOutput output = new PlainTextOutput();

            output.writeLine(handler.toString());
            output.writeLine("Try Nodes:");
            output.indent();

            for (final ControlFlowNode node : tryNodes) {
                output.writeLine(node.toString());
            }

            output.unindent();
            output.writeLine("Handler Nodes:");
            output.indent();

            for (final ControlFlowNode node : handlerNodes) {
                output.writeLine(node.toString());
            }

            output.unindent();
            output.writeLine();

            System.out.println(output);
        }
View Full Code Here

Examples of com.strobel.decompiler.PlainTextOutput

        }
    }

    @Override
    public String typeToString(final TypeReference type, final boolean includePackage) {
        final ITextOutput output = new PlainTextOutput();
        DecompilerHelpers.writeType(output, type, includePackage ? NameSyntax.TYPE_NAME : NameSyntax.SHORT_TYPE_NAME);
        return output.toString();
    }
View Full Code Here

Examples of com.strobel.decompiler.PlainTextOutput

        block.addChild(new Comment(" ", CommentType.SingleLine), Roles.COMMENT);
        block.addChild(new Comment(" This method could not be decompiled.", CommentType.SingleLine), Roles.COMMENT);
        block.addChild(new Comment(" ", CommentType.SingleLine), Roles.COMMENT);

        try {
            final PlainTextOutput bytecodeOutput = new PlainTextOutput();
            final DecompilationOptions bytecodeOptions = new DecompilationOptions();

            bytecodeOptions.getSettings().setIncludeLineNumbersInBytecode(false);

            Languages.bytecode().decompileMethod(method, bytecodeOutput, bytecodeOptions);

            final List<String> bytecodeLines = StringUtilities.split(
                bytecodeOutput.toString(),
                true,
                '\r',
                '\n'
            );
View Full Code Here

Examples of com.strobel.decompiler.PlainTextOutput

    private static String formatByteCodeOperand(final Object operand) {
        if (operand == null) {
            return StringUtilities.EMPTY;
        }

        final PlainTextOutput output = new PlainTextOutput();
        DecompilerHelpers.writeOperand(output, operand);
        return output.toString();
    }
View Full Code Here

Examples of com.strobel.decompiler.PlainTextOutput

    public String getText(final JavaFormattingOptions options) {
        if (isNull()) {
            return StringUtilities.EMPTY;
        }

        final ITextOutput output = new PlainTextOutput();
        final JavaOutputVisitor visitor = new JavaOutputVisitor(output, DecompilerSettings.javaDefaults());

        acceptVisitor(visitor, null);

        return output.toString();
    }
View Full Code Here

Examples of com.strobel.decompiler.PlainTextOutput

    public abstract void writeTo(final ITextOutput output);

    @Override
    public String toString() {
        final PlainTextOutput output = new PlainTextOutput();
        writeTo(output);
        return output.toString();
    }
View Full Code Here

Examples of com.strobel.decompiler.PlainTextOutput

                    output.writeAttribute(attribute.getName());
                    output.writeLine(":");
                    output.indent();

                    final PlainTextOutput temp = new PlainTextOutput();

                    DecompilerHelpers.writeMethodSignature(temp, method);
                    DecompilerHelpers.writeMethodSignature(output, method);

                    if (!StringUtilities.equals(temp.toString(), signature)) {
                        output.write(' ');
                        output.writeDelimiter("[");
                        output.write("from metadata: ");
                        output.writeError(signature);
                        output.writeDelimiter("]");
View Full Code Here

Examples of com.strobel.decompiler.PlainTextOutput

  public String getSource( CompilationUnit sourceTree )
  {
    // render the AST into source
    StringWriter buf = new StringWriter();
    sourceTree.acceptVisitor( new InsertParenthesesVisitor(), null );
    sourceTree.acceptVisitor( new JavaOutputVisitor( new PlainTextOutput( buf ), m_settings ), null );
    return buf.toString();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.