Examples of TypeVariable


Examples of org.aspectj.weaver.TypeVariable

      for (int i = 0; i < superInterfaceBindings.length; i++) {
        superinterfaces[i] = UnresolvedType.forSignature(new String(superInterfaceBindings[i].signature()));
      }
    }
    // XXX what about lower binding?
    TypeVariable tv = new TypeVariable(name, superclass, superinterfaces);
    tv.setDeclaringElement(factory.fromBinding(typeParameter.binding.declaringElement));
    tv.setRank(typeParameter.binding.rank);
    return tv;
  }
View Full Code Here

Examples of org.aspectj.weaver.TypeVariable

      if (myType != null) {
        TypeVariable[] tVars = myType.getTypeVariables();
        if (tVars.length > 0) {
          signature.append("<");
          for (int i = 0; i < tVars.length; i++) {
            TypeVariable variable = tVars[i];
            signature.append(variable.getSignatureForAttribute());
          }
          signature.append(">");
        }
      }
      // now the supertype
View Full Code Here

Examples of org.aspectj.weaver.TypeVariable

    // Check if its a type variable binding that we need to recover to an alias...
    if (typeVariablesForAliasRecovery != null) {
      String aliasname = (String) typeVariablesForAliasRecovery.get(aTypeVariableBinding);
      if (aliasname != null) {
        UnresolvedTypeVariableReferenceType ret = new UnresolvedTypeVariableReferenceType();
        ret.setTypeVariable(new TypeVariable(aliasname));
        return ret;
      }
    }

    if (typeVariablesForThisMember.containsKey(new String(aTypeVariableBinding.sourceName))) {
      return (UnresolvedType) typeVariablesForThisMember.get(new String(aTypeVariableBinding.sourceName));
    }

    // Create the UnresolvedTypeVariableReferenceType for the type variable
    String name = CharOperation.charToString(aTypeVariableBinding.sourceName());

    UnresolvedTypeVariableReferenceType ret = new UnresolvedTypeVariableReferenceType();
    typeVariableBindingsInProgress.put(aTypeVariableBinding, ret);

    TypeVariable tv = new TypeVariable(name);
    ret.setTypeVariable(tv);
    // Dont set any bounds here, you'll get in a recursive mess
    // TODO -- what about lower bounds??
    UnresolvedType superclassType = fromBinding(aTypeVariableBinding.superclass());
    UnresolvedType[] superinterfaces = null;
    if (aTypeVariableBinding == null || aTypeVariableBinding.superInterfaces == null) {
      // sign of another bug that will be reported elsewhere
      superinterfaces = UnresolvedType.NONE;
    } else {
      superinterfaces = new UnresolvedType[aTypeVariableBinding.superInterfaces.length];
      for (int i = 0; i < superinterfaces.length; i++) {
        superinterfaces[i] = fromBinding(aTypeVariableBinding.superInterfaces[i]);
      }
    }
    tv.setSuperclass(superclassType);
    tv.setAdditionalInterfaceBounds(superinterfaces);
    tv.setRank(aTypeVariableBinding.rank);
    if (aTypeVariableBinding.declaringElement instanceof MethodBinding) {
      tv.setDeclaringElementKind(TypeVariable.METHOD);
      // tv.setDeclaringElement(fromBinding((MethodBinding)aTypeVariableBinding.declaringElement);
    } else {
      tv.setDeclaringElementKind(TypeVariable.TYPE);
      // // tv.setDeclaringElement(fromBinding(aTypeVariableBinding.declaringElement));
    }
    if (aTypeVariableBinding.declaringElement instanceof MethodBinding) {
      typeVariablesForThisMember.put(new String(aTypeVariableBinding.sourceName), ret);
    }
View Full Code Here

Examples of org.cx4a.rsense.typing.annotation.TypeVariable

            if (array.isModified()) {
                return;
            }
        } else {
            TypeVarMap tvmap = getTypeVarMap(object);
            TypeVariable var = TypeVariable.valueOf("t");
            if (tvmap != null && tvmap.containsKey(var)) {
                element = tvmap.get(var);
            }
        }
       
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.