Examples of ConstructorEntry


Examples of cuchaz.enigma.mapping.ConstructorEntry

    if( ref instanceof MethodReference )
    {
      MethodReference methodRef = (MethodReference)ref;
      if( methodRef.isConstructor() )
      {
        behaviorEntry = new ConstructorEntry( classEntry, ref.getSignature() );
      }
      else if( methodRef.isTypeInitializer() )
      {
        behaviorEntry = new ConstructorEntry( classEntry );
      }
      else
      {
        behaviorEntry = new MethodEntry( classEntry, ref.getName(), ref.getSignature() );
      }
View Full Code Here

Examples of cuchaz.enigma.mapping.ConstructorEntry

    ClassEntry classEntry = new ClassEntry( def.getDeclaringType().getInternalName() );
    MethodDefinition methodDef = (MethodDefinition)def.getMethod();
    BehaviorEntry behaviorEntry;
    if( methodDef.isConstructor() )
    {
      behaviorEntry = new ConstructorEntry( classEntry, methodDef.getSignature() );
    }
    else
    {
      behaviorEntry = new MethodEntry( classEntry, methodDef.getName(), methodDef.getSignature() );
    }
View Full Code Here

Examples of cuchaz.enigma.mapping.ConstructorEntry

  {
    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

Examples of cuchaz.enigma.mapping.ConstructorEntry

    ClassEntry classEntry = new ClassEntry( def.getDeclaringType().getInternalName() );
    BehaviorEntry behaviorEntry = BehaviorEntryFactory.create( classEntry, def.getName(), def.getSignature() );
    AstNode tokenNode = node.getNameToken();
    if( behaviorEntry instanceof ConstructorEntry )
    {
      ConstructorEntry constructorEntry = (ConstructorEntry)behaviorEntry;
      if( constructorEntry.isStatic() )
      {
        tokenNode = node.getModifiers().firstOrNullObject();
      }
    }
    index.addDeclaration( tokenNode, behaviorEntry );
View Full Code Here

Examples of cuchaz.enigma.mapping.ConstructorEntry

  @Override
  public Void visitConstructorDeclaration( ConstructorDeclaration node, SourceIndex index )
  {
    MethodDefinition def = node.getUserData( Keys.METHOD_DEFINITION );
    ClassEntry classEntry = new ClassEntry( def.getDeclaringType().getInternalName() );
    ConstructorEntry constructorEntry = new ConstructorEntry( classEntry, def.getSignature() );
    index.addDeclaration( node.getNameToken(), constructorEntry );
    return node.acceptVisitor( new SourceIndexBehaviorVisitor( constructorEntry ), index );
  }
View Full Code Here

Examples of cuchaz.enigma.mapping.ConstructorEntry

 
  @Test
  @SuppressWarnings( "unchecked" )
  public void baseDefault( )
  {
    BehaviorEntry source = new ConstructorEntry( m_baseClass, "()V" );
    Collection<EntryReference<BehaviorEntry,BehaviorEntry>> references = m_index.getBehaviorReferences( source );
    assertThat( references, containsInAnyOrder(
      newBehaviorReferenceByMethod( source, m_callerClass.getName(), "a", "()V" ),
      newBehaviorReferenceByConstructor( source, m_subClass.getName(), "()V" ),
      newBehaviorReferenceByConstructor( source, m_subClass.getName(), "(III)V" )
View Full Code Here

Examples of cuchaz.enigma.mapping.ConstructorEntry

 
  @Test
  @SuppressWarnings( "unchecked" )
  public void baseInt( )
  {
    BehaviorEntry source = new ConstructorEntry( m_baseClass, "(I)V" );
    assertThat( m_index.getBehaviorReferences( source ), containsInAnyOrder(
      newBehaviorReferenceByMethod( source, m_callerClass.getName(), "b", "()V" )
    ) );
  }
View Full Code Here

Examples of cuchaz.enigma.mapping.ConstructorEntry

  @Test
  @SuppressWarnings( "unchecked" )
  public void subDefault( )
  {
    BehaviorEntry source = new ConstructorEntry( m_subClass, "()V" );
    assertThat( m_index.getBehaviorReferences( source ), containsInAnyOrder(
      newBehaviorReferenceByMethod( source, m_callerClass.getName(), "c", "()V" ),
      newBehaviorReferenceByConstructor( source, m_subClass.getName(), "(I)V" )
    ) );
  }
View Full Code Here

Examples of cuchaz.enigma.mapping.ConstructorEntry

  @Test
  @SuppressWarnings( "unchecked" )
  public void subInt( )
  {
    BehaviorEntry source = new ConstructorEntry( m_subClass, "(I)V" );
    assertThat( m_index.getBehaviorReferences( source ), containsInAnyOrder(
      newBehaviorReferenceByMethod( source, m_callerClass.getName(), "d", "()V" ),
      newBehaviorReferenceByConstructor( source, m_subClass.getName(), "(II)V" ),
      newBehaviorReferenceByConstructor( source, m_subsubClass.getName(), "(I)V" )
    ) );
View Full Code Here

Examples of cuchaz.enigma.mapping.ConstructorEntry

  @Test
  @SuppressWarnings( "unchecked" )
  public void subIntInt( )
  {
    BehaviorEntry source = new ConstructorEntry( m_subClass, "(II)V" );
    assertThat( m_index.getBehaviorReferences( source ), containsInAnyOrder(
      newBehaviorReferenceByMethod( source, m_callerClass.getName(), "e", "()V" )
    ) );
  }
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.