Package com.strobel.assembler.metadata

Examples of com.strobel.assembler.metadata.TypeDefinition


            }
        }

        for (AstNode child = node.getFirstChild(); child != null; child = child.getNextSibling()) {
            if (child instanceof TypeDeclaration) {
                final TypeDefinition currentType = context.getCurrentType();
                final MethodDefinition currentMethod = context.getCurrentMethod();

                context.setCurrentType(null);
                context.setCurrentMethod(null);

                try {
                    final TypeDefinition type = child.getUserData(Keys.TYPE_DEFINITION);

                    if (type != null && type.isInterface()) {
                        continue;
                    }

                    new DeclareVariablesTransform(context).run(child);
                }
View Full Code Here


 
  @Override
  public Void visitTypeDeclaration( TypeDeclaration node, SourceIndex index )
  {
    // is this this class, or a subtype?
    TypeDefinition def = node.getUserData( Keys.TYPE_DEFINITION );
    ClassEntry classEntry = new ClassEntry( def.getInternalName() );
    if( !classEntry.equals( m_classEntry ) )
    {
      // it's a sub-type, recurse
      index.addDeclaration( node.getNameToken(), classEntry );
      return node.acceptVisitor( new SourceIndexClassVisitor( classEntry ), index );
View Full Code Here

      getTranslator( TranslationDirection.Obfuscating ),
      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 );
View Full Code Here

public class SourceIndexVisitor implements IAstVisitor<SourceIndex,Void>
{
  @Override
  public Void visitTypeDeclaration( TypeDeclaration node, SourceIndex index )
  {
    TypeDefinition def = node.getUserData( Keys.TYPE_DEFINITION );
    ClassEntry classEntry = new ClassEntry( def.getInternalName() );
    index.addDeclaration( node.getNameToken(), classEntry );
   
    return node.acceptVisitor( new SourceIndexClassVisitor( classEntry ), index );
  }
View Full Code Here

TOP

Related Classes of com.strobel.assembler.metadata.TypeDefinition

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.