Package com.dragome.compiler.type

Examples of com.dragome.compiler.type.Signature


  public void taint(String signature)
  {
    signature= signature.replaceAll("\\s", "");

    Signature s= Project.getSingleton().getSignature(signature);
    if (s.isClass())
    {
      ClassUnit clazz= resolve(s.className());

      for (MemberUnit member : clazz.getDeclaredMembers())
      {
        taint(member.getAbsoluteSignature());
      }
View Full Code Here


  }

  private Signature popSignature()
  {
    Iterator<Signature> iter= unprocessedTaintedSignatures.iterator();
    Signature signature= iter.next();
    iter.remove();
    return signature;
  }
View Full Code Here

    {

    }
    signatureString= signatureString.replaceAll("/", ".");

    Signature signature= signatures.get(signatureString);
    if (signature == null)
    {
      signature= new Signature(signatureString, getUniqueId());
      signatures.put(signatureString, signature);
    }

    return signature;
  }
View Full Code Here

  {
    ClassUnit classUnit= classesByName.get(className);
    if (classUnit != null)
      return classUnit;

    Signature signature= Project.singleton.getSignature(className);
    classUnit= new ClassUnit(this, signature);
    classesByName.put(className, classUnit);

    if (className.equals("java.lang.Object"))
    {
View Full Code Here

    return unit;
  }

  public ProcedureUnit getProcedureUnit(MethodBinding methodBinding)
  {
    Signature signature= Project.singleton.getSignature(methodBinding.getRelativeSignature());
    String className= methodBinding.getDeclaringClass().getClassName();
    return (ProcedureUnit) getMemberUnit(className, signature);
  }
View Full Code Here

    return (ProcedureUnit) getMemberUnit(className, signature);
  }

  public ProcedureUnit getOrCreateProcedureUnit(MethodBinding methodBinding)
  {
    Signature signature= Project.singleton.getSignature(methodBinding.getRelativeSignature());
    String className= methodBinding.getDeclaringClass().getClassName();
    return (ProcedureUnit) getOrCreateMemberUnit(className, signature, Pass1.extractMethodNameSignature(methodBinding));
  }
View Full Code Here

  }

  public void addReference(MethodDeclaration decl, ArrayCreation ac)
  {
    ProcedureUnit source= getOrCreateProcedureUnit(decl.getMethodBinding());
    Signature signature= Project.getSingleton().getArraySignature(ac.getTypeBinding());
    for (int i= 0; i < ac.getDimensions().size(); i++)
    {

      source.addTarget(Project.singleton.getSignature(signature.toString().substring(i) + "#length"));
    }
  }
View Full Code Here

      {
        Map<String, String> map= new LinkedHashMap<String, String>();
        annotations[j]= map;
        int nameIndex= file.readUnsignedShort();
        Constant constant= constantPool.getConstant(nameIndex);
        Signature signature= Project.getSingleton().getSignature(((ConstantUtf8) constant).getBytes());
        map.put("$signature", signature.toString());
        int fieldCount= file.readUnsignedShort();
        for (int i= 0; i < fieldCount; i++)
        {
          int fieldIndex= file.readUnsignedShort();
          constant= constantPool.getConstant(fieldIndex);
View Full Code Here

    return declaringClass;
  }

  public Signature getAbsoluteSignature()
  {
    Signature s= Project.getSingleton().getSignature(declaringClass.toString(), getSignature().toString());
    return s;
  }
View Full Code Here

      MethodBinding binding= MethodBinding.lookup(jc.getClassName(), method.getName(), method.getSignature());

      String genericSignature= method.getGenericSignature();
      if (genericSignature != null && !genericSignature.equals(method.getSignature()))
      {
        Signature signature= Project.getSingleton().getSignature(binding.toString()).relative();
        String normalizedSignature= DragomeJavaScriptGenerator.normalizeExpression(signature);
        String normalizedClassname= DragomeJavaScriptGenerator.normalizeExpression(type.getClassName());
        Project.getSingleton().addGenericSignature(normalizedClassname + "|" + normalizedSignature + "|" + genericSignature);
        //    System.out.println(genericSignature);
      }

      if (DragomeJsCompiler.compiler.getSingleEntryPoint() != null)
      {
        Signature signature= Project.getSingleton().getSignature(binding.toString());
        String singleSignature= DragomeJsCompiler.compiler.getSingleEntryPoint();
        if (!signature.toString().equals(singleSignature))
          continue;
      }

      MethodDeclaration methodDecl= new MethodDeclaration(binding, method.getAccessFlags(), method.getCode(), methodAnnotationsValues);
      typeDecl.addMethod(methodDecl);
View Full Code Here

TOP

Related Classes of com.dragome.compiler.type.Signature

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.