Package com.strobel.decompiler

Examples of com.strobel.decompiler.DecompilerContext


        final Map<ParameterDefinition, ? extends AstNode> argumentMappings) {

        VerifyArgument.notNull(method, "method");
        VerifyArgument.notNull(argumentMappings, "argumentMappings");

        final DecompilerContext context = new DecompilerContext();
        final MethodDefinition definition = method.getUserData(Keys.METHOD_DEFINITION);

        if (definition != null) {
            context.setCurrentType(definition.getDeclaringType());
        }

        final InliningVisitor visitor = new InliningVisitor(context, argumentMappings);

        visitor.run(method);
View Full Code Here


            output.writeDelimiter(";");
            output.writeLine();
            return;
        }

        final DecompilerContext context = new DecompilerContext();

        context.setCurrentMethod(method);
        context.setCurrentType(method.getDeclaringType());

        final Block methodAst = new Block();

        output.writeLine(" {");
        output.indent();
View Full Code Here

        final DecompilationOptions options,
        final TypeDefinition currentType,
        final boolean isSingleMember) {

        final DecompilerSettings settings = options.getSettings();
        final DecompilerContext context = new DecompilerContext();

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

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

            output.writeDelimiter(";");
            output.writeLine();
            return;
        }

        final DecompilerContext context = new DecompilerContext();

        context.setCurrentMethod(method);
        context.setCurrentType(method.getDeclaringType());

        final Block methodAst = new Block();

        output.writeLine(" {");
        output.indent();
View Full Code Here

                if (functionMethod == null) {
                    return null;
                }

                final DecompilerContext innerContext = new DecompilerContext(context.getSettings());

                innerContext.setCurrentType(resolvedMethod.getDeclaringType());
                innerContext.setCurrentMethod(resolvedMethod);

                final MethodBody methodBody = resolvedMethod.getBody();
                final List<ParameterDefinition> parameters = resolvedMethod.getParameters();
                final Variable[] parameterMap = new Variable[methodBody.getMaxLocals()];
View Full Code Here

        final Map<ParameterDefinition, ? extends AstNode> argumentMappings) {

        VerifyArgument.notNull(method, "method");
        VerifyArgument.notNull(argumentMappings, "argumentMappings");

        final DecompilerContext context = new DecompilerContext();
        final MethodDefinition definition = method.getUserData(Keys.METHOD_DEFINITION);

        if (definition != null) {
            context.setCurrentType(definition.getDeclaringType());
        }

        final InliningVisitor visitor = new InliningVisitor(context, argumentMappings);

        visitor.run(method);
View Full Code Here

        final DecompilationOptions options,
        final TypeDefinition currentType,
        final boolean isSingleMember) {

        final DecompilerSettings settings = options.getSettings();
        final DecompilerContext context = new DecompilerContext();

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

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

      getTranslator( TranslationDirection.Deobfuscating )
    ) );
   
    // 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.DecompilerContext

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.