Package org.aspectj.org.eclipse.jdt.internal.compiler.lookup

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding


   * in AspectJ world holds a TypeVariable and it is this type variable that is converted
   * to the TypeVariableBinding.
   */
  private TypeVariableBinding makeTypeVariableBinding(TypeVariableReference tvReference) {
    TypeVariable tv = tvReference.getTypeVariable();
    TypeVariableBinding tvBinding = (TypeVariableBinding)typeVariableToTypeBinding.get(tv.getName());
    if (currentType!=null) {
      TypeVariableBinding tvb = currentType.getTypeVariable(tv.getName().toCharArray());     
      if (tvb!=null) return tvb;
    }
    if (tvBinding==null) {
      Binding declaringElement = null;
      // this will cause an infinite loop or NPE... not required yet luckily.
//      if (tVar.getDeclaringElement() instanceof Member) {
//      declaringElement = makeMethodBinding((ResolvedMember)tVar.getDeclaringElement());
//      } else {
//      declaringElement = makeTypeBinding((UnresolvedType)tVar.getDeclaringElement());
//      }
      tvBinding = new TypeVariableBinding(tv.getName().toCharArray(),declaringElement,tv.getRank());
      typeVariableToTypeBinding.put(tv.getName(),tvBinding);
      tvBinding.superclass=(ReferenceBinding)makeTypeBinding(tv.getUpperBound());
      tvBinding.firstBound=(ReferenceBinding)makeTypeBinding(tv.getFirstBound());
      if (tv.getAdditionalInterfaceBounds()==null) {
      tvBinding.superInterfaces=TypeVariableBinding.NoSuperInterfaces;
View Full Code Here


    }
    return tvBinding;
  }
 
  private TypeVariableBinding makeTypeVariableBindingFromAJTypeVariable(TypeVariable tv) {
    TypeVariableBinding tvBinding = (TypeVariableBinding)typeVariableToTypeBinding.get(tv.getName());
    if (currentType!=null) {
      TypeVariableBinding tvb = currentType.getTypeVariable(tv.getName().toCharArray());     
      if (tvb!=null) return tvb;
    }
    if (tvBinding==null) {
      Binding declaringElement = null;
      // this will cause an infinite loop or NPE... not required yet luckily.
//      if (tVar.getDeclaringElement() instanceof Member) {
//      declaringElement = makeMethodBinding((ResolvedMember)tVar.getDeclaringElement());
//      } else {
//      declaringElement = makeTypeBinding((UnresolvedType)tVar.getDeclaringElement());
//      }
      tvBinding = new TypeVariableBinding(tv.getName().toCharArray(),declaringElement,tv.getRank());
      typeVariableToTypeBinding.put(tv.getName(),tvBinding);
      tvBinding.superclass=(ReferenceBinding)makeTypeBinding(tv.getUpperBound());
      tvBinding.firstBound=(ReferenceBinding)makeTypeBinding(tv.getFirstBound());
      if (tv.getAdditionalInterfaceBounds()==null) {
      tvBinding.superInterfaces=TypeVariableBinding.NoSuperInterfaces;
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding

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.