Examples of ArrayBinding


Examples of org.eclipse.jdt.internal.compiler.lookup.ArrayBinding

  /* (non-Javadoc)
   * @see javax.lang.model.type.TypeMirror#getKind()
   */
  @Override
  public TypeKind getKind() {
    ArrayBinding type = (ArrayBinding)_binding;
    if (!type.isValidBinding() || ((type.leafComponentType().tagBits & TagBits.HasMissingType) != 0)) {
      return TypeKind.ERROR;
    }
    return TypeKind.ARRAY;
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.ArrayBinding

    sourceEnd);
}
public void varargsArgumentNeedCast(MethodBinding method, TypeBinding argumentType, InvocationSite location) {
  int severity = this.options.getSeverity(CompilerOptions.VarargsArgumentNeedCast);
  if (severity == ProblemSeverities.Ignore) return;
  ArrayBinding varargsType = (ArrayBinding)method.parameters[method.parameters.length-1];
  if (method.isConstructor()) {
    this.handle(
      IProblem.ConstructorVarargsArgumentNeedCast,
      new String[] {
          new String(argumentType.readableName()),
          new String(varargsType.readableName()),
          new String(method.declaringClass.readableName()),
          typesAsString(method, false),
          new String(varargsType.elementsType().readableName()),
      },
      new String[] {
          new String(argumentType.shortReadableName()),
          new String(varargsType.shortReadableName()),
          new String(method.declaringClass.shortReadableName()),
          typesAsString(method, true),
          new String(varargsType.elementsType().shortReadableName()),
      },
      severity,
      location.sourceStart(),
      location.sourceEnd());
  } else {
    this.handle(
      IProblem.MethodVarargsArgumentNeedCast,
      new String[] {
          new String(argumentType.readableName()),
          new String(varargsType.readableName()),
          new String(method.selector),
          typesAsString(method, false),
          new String(method.declaringClass.readableName()),
          new String(varargsType.elementsType().readableName()),
      },
      new String[] {
          new String(argumentType.shortReadableName()),
          new String(varargsType.shortReadableName()),
          new String(method.selector), typesAsString(method, true),
          new String(method.declaringClass.shortReadableName()),
          new String(varargsType.elementsType().shortReadableName()),
      },
      severity,
      location.sourceStart(),
      location.sourceEnd());
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.ArrayBinding

   */
  public ITypeBinding getComponentType() {
    if (!isArray()) {
      return null;
    }
    ArrayBinding arrayBinding = (ArrayBinding) this.binding;
    return this.resolver.getTypeBinding(arrayBinding.elementsType());
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.ArrayBinding

   */
  public int getDimensions() {
    if (!isArray()) {
      return 0;
    }
    ArrayBinding arrayBinding = (ArrayBinding) this.binding;
    return arrayBinding.dimensions;
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.ArrayBinding

   */
  public ITypeBinding getElementType() {
    if (!isArray()) {
      return null;
    }
    ArrayBinding arrayBinding = (ArrayBinding) this.binding;
    return this.resolver.getTypeBinding(arrayBinding.leafComponentType);
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.ArrayBinding

      } else {
        final org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding = (org.eclipse.jdt.internal.compiler.lookup.TypeBinding) declaringElement;
        if (typeBinding instanceof ReferenceBinding) {
          return !((ReferenceBinding) typeBinding).isBinaryBinding();
        } else if (typeBinding instanceof ArrayBinding) {
          final ArrayBinding arrayBinding = (ArrayBinding) typeBinding;
          final org.eclipse.jdt.internal.compiler.lookup.TypeBinding leafComponentType = arrayBinding.leafComponentType;
          if (leafComponentType instanceof ReferenceBinding) {
            return !((ReferenceBinding) leafComponentType).isBinaryBinding();
          }
        }
View Full Code Here

Examples of org.jboss.aop.array.ArrayBinding

    */
   public void removeArrayBinding(String name)
   {
      synchronized (arrayBindings)
      {
         ArrayBinding pointcut = arrayBindings.remove(name);
         if (pointcut == null) return;
         ArrayAdvisor.removeBinding(pointcut);
      }
   }
View Full Code Here

Examples of org.jboss.aop.array.ArrayBinding

      lock.lockWrite();
      try
      {
         synchronized (arrayBindings)
         {
            ArrayBinding pointcut = arrayBindings.remove(name);
            if (pointcut == null) return;
            ArrayAdvisor.removeBinding(pointcut);
         }
      }
      finally
View Full Code Here

Examples of org.jboss.aop.array.ArrayBinding

    */
   public void removeArrayBinding(String name)
   {
      synchronized (arrayBindings)
      {
         ArrayBinding pointcut = arrayBindings.remove(name);
         if (pointcut == null) return;
         ArrayAdvisor.removeBinding(pointcut);
      }
   }
View Full Code Here

Examples of org.jboss.aop.array.ArrayBinding

         if (!inters[i].getAspect().getScope().equals(Scope.PER_VM))
         {
            throw new RuntimeException("Only PER_VM scoped aspects/interceptors can be used in arraybindings");
         }
      }
      ArrayBinding binding = new ArrayBinding(name, inters, theType);
      manager.addArrayBinding(binding);
   }
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.