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

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


        return null;
      }
    } else if (referenceBinding.isTypeVariable()) {
      // type parameter
      final String typeVariableName = new String(referenceBinding.sourceName());
      Binding declaringElement = ((TypeVariableBinding) referenceBinding).declaringElement;
      IBinding declaringTypeBinding = null;
      if (declaringElement instanceof MethodBinding) {
        declaringTypeBinding = this.resolver.getMethodBinding((MethodBinding) declaringElement);
        IMethod declaringMethod = (IMethod) declaringTypeBinding.getJavaElement();
        return (JavaElement) declaringMethod.getTypeParameter(typeVariableName);
View Full Code Here


      } else {
        return !referenceBinding.isBinaryBinding();
      }
    } else if (isTypeVariable()) {
      final TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
      final Binding declaringElement = typeVariableBinding.declaringElement;
      if (declaringElement instanceof MethodBinding) {
        MethodBinding methodBinding = (MethodBinding) declaringElement;
        return !methodBinding.declaringClass.isBinaryBinding();
      } else {
        final org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding = (org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding) declaringElement;
View Full Code Here

        location[0] = sv.sourceStart;
        location[1] = sv.sourceEnd;
        return new String(sv.source());
      } else if (sma.memberValue instanceof NameReference
          && (((NameReference) sma.memberValue).binding instanceof FieldBinding)) {
        Binding b = ((NameReference) sma.memberValue).binding;
        Constant c = ((FieldBinding) b).constant;
        return c.stringValue();
      }
    }
    if (!(inAnnotation instanceof NormalAnnotation))
View Full Code Here

  }
 
  public void consumeCapture(final int position) {
    CompilationUnitDeclaration outerParsedUnit = this.outerMostParsedUnit == null ? this.parsedUnit : this.outerMostParsedUnit;
    if (outerParsedUnit == null) return;
    final Binding wildcardBinding = ((BindingKeyResolver) this.types.get(0)).compilerBinding;
    class CaptureFinder extends ASTVisitor {
      CaptureBinding capture;
      boolean checkType(TypeBinding binding) {
        if (binding == null)
          return false;
View Full Code Here

}
protected void matchLevelAndReportImportRef(ImportReference importRef, Binding binding, MatchLocator locator) throws CoreException {
 
  // for static import, binding can be a field binding or a member type binding
  // verify that in this case binding is static and use declaring class for fields
  Binding refBinding = binding;
  if (importRef.isStatic()) {
    if (binding instanceof FieldBinding) {
      FieldBinding fieldBinding = (FieldBinding) binding;
      if (!fieldBinding.isStatic()) return;
      refBinding = fieldBinding.declaringClass;
View Full Code Here

    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());
View Full Code Here

    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());
View Full Code Here

TOP

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

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.