Package com.google.devtools.depan.java.graph

Examples of com.google.devtools.depan.java.graph.TypeElement


      // an innerclass contained into an anonymous class.
      checkAnonymousType(superClass);

      // A digit must follow the $ in the name.
      if (Character.isDigit(name.charAt(name.lastIndexOf('$')+1))) {
        TypeElement superType = TypeNameUtil.fromInternalName(superClass);
        dl.newDep(superType, mainClass, JavaRelation.ANONYMOUS_TYPE);
      }
    }
  }
View Full Code Here


  }

  @Override
  public FieldVisitor visitField(int access, String name, String desc,
      String signature, Object value) {
    TypeElement type = TypeNameUtil.fromDescriptor(desc);
    FieldElement field = new FieldElement(name, type, mainClass);

    // simple className
    dl.newDep(mainClass, type, JavaRelation.TYPE);
View Full Code Here

      //    + outerName + " - " + innerName + " - " + access + " @ "
      //    + mainClass);
      // FIXME(ycoppel): probably an enum. What to do ?
      return;
    }
    TypeElement inner = TypeNameUtil.fromInternalName(name);
    if (inner.equals(mainClass)) {
      // the visitInnerClass callback is called twice: once when visiting the
      // outer class (A in A$B), and once when visiting the A$B class. we
      // shortcut the second case so we don't add the dependency twice.
      return;
    }
    TypeElement parent = TypeNameUtil.fromInternalName(outerName);
    dl.newDep(parent, inner, JavaRelation.INNER_TYPE);
  }
View Full Code Here

      dl.newDep(m, TypeNameUtil.fromDescriptor(t.getDescriptor()),
          JavaRelation.TYPE);
    }

    // return-type dependency
    TypeElement type = TypeNameUtil.fromDescriptor(
        Type.getReturnType(desc).getDescriptor());
    dl.newDep(m, type, JavaRelation.READ);

    return new MethodDepLister(dl, m);
  }
View Full Code Here

   * @return {@code TypeElement} suitable for addition to a dependency graph
   */
  public static TypeElement fromDescriptor(String desc) {
    Type type = Type.getType(desc);
    String fullyQualifiedName = getFullyQualifiedTypeName(type);
    return new TypeElement(fullyQualifiedName);
  }
View Full Code Here

   * @return {@code TypeElement} suitable for addition to a dependency graph
   */
  public static TypeElement fromInternalName(String internalName) {
    Type type = Type.getObjectType(internalName);
    String fullyQualifiedName = getFullyQualifiedTypeName(type);
    return new TypeElement(fullyQualifiedName);
  }
View Full Code Here

TOP

Related Classes of com.google.devtools.depan.java.graph.TypeElement

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.