Package com.strobel.decompiler.languages.java.ast

Examples of com.strobel.decompiler.languages.java.ast.AstBuilder


        return ".java";
    }

    @Override
    public void decompileType(final TypeDefinition type, final ITextOutput output, final DecompilationOptions options) {
        final AstBuilder builder = createAstBuilder(options, type, false);
        builder.addType(type);
        runTransformsAndGenerateCode(builder, output, options, null);
    }
View Full Code Here


        final DecompilerContext context = new DecompilerContext();

        context.setCurrentType(currentType);
        context.setSettings(settings);

        return new AstBuilder(context);
    }
View Full Code Here

        return ".java";
    }

    @Override
    public TypeDecompilationResults decompileType(final TypeDefinition type, final ITextOutput output, final DecompilationOptions options) {
        final AstBuilder astBuilder = buildAst(type, options);
        final List<LineNumberPosition> lineNumberPositions = astBuilder.generateCode(output);

        return new TypeDecompilationResults(lineNumberPositions);
    }
View Full Code Here

    public CompilationUnit decompileTypeToAst(final TypeDefinition type, final DecompilationOptions options) {
        return buildAst(type, options).getCompilationUnit();
    }

    private AstBuilder buildAst(final TypeDefinition type, final DecompilationOptions options) {
        final AstBuilder builder = createAstBuilder(options, type, false);
        builder.addType(type);
        runTransforms(builder, options, null);
        return builder;
    }
View Full Code Here

        final DecompilerContext context = new DecompilerContext();

        context.setCurrentType(currentType);
        context.setSettings(settings);

        return new AstBuilder(context);
    }
View Full Code Here

    // decompile it!
    TypeDefinition resolvedType = new MetadataSystem( m_settings.getTypeLoader() ).lookupType( lookupClassName ).resolve();
    DecompilerContext context = new DecompilerContext();
    context.setCurrentType( resolvedType );
    context.setSettings( m_settings );
    AstBuilder builder = new AstBuilder( context );
    builder.addType( resolvedType );
    builder.runTransformations( null );
    return builder.getCompilationUnit();
  }
View Full Code Here

TOP

Related Classes of com.strobel.decompiler.languages.java.ast.AstBuilder

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.