Examples of ClassEntry


Examples of com.sun.java.util.jar.pack.ConstantPool.ClassEntry

            // Collect the class body, sans bytecodes.
            Class cls = classes[i];
            if (verbose > 1)
                Utils.log.fine("Scanning "+cls);

            ClassEntry   thisClass  = cls.thisClass;
            ClassEntry   superClass = cls.superClass;
            ClassEntry[] interfaces = cls.interfaces;
            // Encode rare case of null superClass as thisClass:
            assert(superClass != thisClass)// bad class file!?
            if (superClass == nullsuperClass = thisClass;
            class_this.putRef(thisClass);
View Full Code Here

Examples of com.sun.java.util.jar.pack.ConstantPool.ClassEntry

    private int initOpVariant(Instruction i, Entry newClass) {
        if (i.getBC() != _invokespecialreturn -1;
        MemberEntry ref = (MemberEntry) i.getCPRef(curCPMap);
        if ("<init>".equals(ref.descRef.nameRef.stringValue()) == false)
            return -1;
        ClassEntry refClass = ref.classRef;
        if (refClass == curClass.thisClass)
            return _invokeinit_op+_invokeinit_self_option;
        if (refClass == curClass.superClass)
            return _invokeinit_op+_invokeinit_super_option;
        if (refClass == newClass)
View Full Code Here

Examples of com.sun.java.util.jar.pack.ConstantPool.ClassEntry

    // else -1.
    private int selfOpVariant(Instruction i) {
        int bc = i.getBC();
        if (!(bc >= _first_linker_op && bc <= _last_linker_op))  return -1;
        MemberEntry ref = (MemberEntry) i.getCPRef(curCPMap);
        ClassEntry refClass = ref.classRef;
        int self_bc = _self_linker_op + (bc - _first_linker_op);
        if (refClass == curClass.thisClass)
            return self_bc;
        if (refClass == curClass.superClass)
            return self_bc + _self_linker_super_flag;
View Full Code Here

Examples of com.sun.java.util.jar.pack.ConstantPool.ClassEntry

                    cpMap[cpi] = ConstantPool.getStringEntry(cpMap[ref].stringValue());
                    break;
                case CONSTANT_Fieldref:
                case CONSTANT_Methodref:
                case CONSTANT_InterfaceMethodref:
                    ClassEntry      mclass = (ClassEntry)      cpMap[ref];
                    DescriptorEntry mdescr = (DescriptorEntry) cpMap[ref2];
                    cpMap[cpi] = ConstantPool.getMemberEntry((byte)tag, mclass, mdescr);
                    break;
                case CONSTANT_NameandType:
                    Utf8Entry mname = (Utf8Entry) cpMap[ref];
View Full Code Here

Examples of cuchaz.enigma.mapping.ClassEntry

  public Void visitInvocationExpression( InvocationExpression node, SourceIndex index )
  {
    MemberReference ref = node.getUserData( Keys.MEMBER_REFERENCE );
   
    // get the behavior entry
    ClassEntry classEntry = new ClassEntry( ref.getDeclaringType().getInternalName() );
    BehaviorEntry behaviorEntry = null;
    if( ref instanceof MethodReference )
    {
      MethodReference methodRef = (MethodReference)ref;
      if( methodRef.isConstructor() )
View Full Code Here

Examples of cuchaz.enigma.mapping.ClassEntry

      if( ref.getSignature().indexOf( '(' ) >= 0 )
      {
        throw new Error( "Expected a field here! got " + ref );
      }
     
      ClassEntry classEntry = new ClassEntry( ref.getDeclaringType().getInternalName() );
      FieldEntry fieldEntry = new FieldEntry( classEntry, ref.getName() );
      index.addReference( node.getMemberNameToken(), fieldEntry, m_behaviorEntry );
    }
   
    return recurse( node, index );
View Full Code Here

Examples of cuchaz.enigma.mapping.ClassEntry

  public Void visitSimpleType( SimpleType node, SourceIndex index )
  {
    TypeReference ref = node.getUserData( Keys.TYPE_REFERENCE );
    if( node.getIdentifierToken().getStartLocation() != TextLocation.EMPTY )
    {
      ClassEntry classEntry = new ClassEntry( ref.getInternalName() );
      index.addReference( node.getIdentifierToken(), classEntry, m_behaviorEntry );
    }
   
    return recurse( node, index );
  }
View Full Code Here

Examples of cuchaz.enigma.mapping.ClassEntry

 
  @Override
  public Void visitParameterDeclaration( ParameterDeclaration node, SourceIndex index )
  {
    ParameterDefinition def = node.getUserData( Keys.PARAMETER_DEFINITION );
    ClassEntry classEntry = new ClassEntry( def.getDeclaringType().getInternalName() );
    MethodDefinition methodDef = (MethodDefinition)def.getMethod();
    BehaviorEntry behaviorEntry;
    if( methodDef.isConstructor() )
    {
      behaviorEntry = new ConstructorEntry( classEntry, methodDef.getSignature() );
View Full Code Here

Examples of cuchaz.enigma.mapping.ClassEntry

  public Void visitIdentifierExpression( IdentifierExpression node, SourceIndex index )
  {
    MemberReference ref = node.getUserData( Keys.MEMBER_REFERENCE );
    if( ref != null )
    {
      ClassEntry classEntry = new ClassEntry( ref.getDeclaringType().getInternalName() );
      FieldEntry fieldEntry = new FieldEntry( classEntry, ref.getName() );
      index.addReference( node.getIdentifierToken(), fieldEntry, m_behaviorEntry );
    }
   
    return recurse( node, index );
View Full Code Here

Examples of cuchaz.enigma.mapping.ClassEntry

  public Void visitObjectCreationExpression( ObjectCreationExpression node, SourceIndex index )
  {
    MemberReference ref = node.getUserData( Keys.MEMBER_REFERENCE );
    if( ref != null )
    {
      ClassEntry classEntry = new ClassEntry( ref.getDeclaringType().getInternalName() );
      ConstructorEntry constructorEntry = new ConstructorEntry( classEntry, ref.getSignature() );
      if( node.getType() instanceof SimpleType )
      {
        SimpleType simpleTypeNode = (SimpleType)node.getType();
        index.addReference( simpleTypeNode.getIdentifierToken(), constructorEntry, m_behaviorEntry );
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.