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

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


   * @see org.aspectj.org.eclipse.jdt.core.dom.ITypeBinding#getElementType()
   */
  public ITypeBinding getElementType() {
    if (this.binding != null) {
      if (this.binding.isArrayType()) {
        ArrayBinding arrayBinding = (ArrayBinding) this.binding;
        return new RecoveredTypeBinding(this.resolver, arrayBinding.leafComponentType);
      } else {
        return new RecoveredTypeBinding(this.resolver, this.binding);
      }
    }
View Full Code Here


  }

  private ReferenceBinding getReferenceBinding() {
    if (this.binding != null) {
      if (this.binding.isArrayType()) {
        ArrayBinding arrayBinding = (ArrayBinding) this.binding;
        if (arrayBinding.leafComponentType instanceof ReferenceBinding) {
          return (ReferenceBinding) arrayBinding.leafComponentType;
        }
      } else if (this.binding instanceof ReferenceBinding) {
        return (ReferenceBinding) this.binding;
View Full Code Here

      if (binding != null) {
        if (type.isArrayType()) {
          ArrayType arrayType = (ArrayType) type;
          if (this.scope == null) return null;
          if (binding.isArrayType()) {
            ArrayBinding arrayBinding = (ArrayBinding) binding;
            return getTypeBinding(this.scope.createArrayType(arrayBinding.leafComponentType, arrayType.getDimensions()));
          } else {
            return getTypeBinding(this.scope.createArrayType(binding, arrayType.getDimensions()));
          }
        } else {
          if (binding.isArrayType()) {
            ArrayBinding arrayBinding = (ArrayBinding) binding;
            return getTypeBinding(arrayBinding.leafComponentType);
          } else {
            return getTypeBinding(binding);
          }
        }
View Full Code Here

      return utvrt;
    }

    // handle arrays since the component type may need special treatment too...
    if (binding instanceof ArrayBinding) {
      ArrayBinding aBinding = (ArrayBinding) binding;
      UnresolvedType componentType = fromBinding(aBinding.leafComponentType);
      return UnresolvedType.makeArray(componentType, aBinding.dimensions);
    }

    if (binding instanceof WildcardBinding) {
View Full Code Here

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

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

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

      } else {
        final org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding = (org.aspectj.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.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding leafComponentType = arrayBinding.leafComponentType;
          if (leafComponentType instanceof ReferenceBinding) {
            return !((ReferenceBinding) leafComponentType).isBinaryBinding();
          }
        }
View Full Code Here

    codeStream.aload(closureIndex);

    // build the Object[]

    codeStream.generateInlinedValue(nargs - 1);
    codeStream.newArray(new ArrayBinding(classScope.getType(TypeConstants.JAVA_LANG_OBJECT,
        TypeConstants.JAVA_LANG_OBJECT.length), 1, classScope.environment()));

    int index = 0;
    for (int i = 0; i < nargs - 1; i++) {
      TypeBinding type = binding.parameters[i];
View Full Code Here

    if (initialization != null && initialization instanceof ArrayInitializer) {
      // System.err.println("got initializer: " + initialization);
      ArrayAllocationExpression aae = new ArrayAllocationExpression();
      aae.initializer = (ArrayInitializer) initialization;
      ArrayBinding arrayType = (ArrayBinding) world.makeTypeBinding(sig.getReturnType());
      aae.type = AstUtil.makeTypeReference(arrayType.leafComponentType());
      aae.sourceStart = initialization.sourceStart;
      aae.sourceEnd = initialization.sourceEnd;
      aae.dimensions = new Expression[arrayType.dimensions];
      initialization = aae;
    } /*
 
View Full Code Here

TOP

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

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.