private Type annotateType(ITypeBinding binding, AST ast, ImportRewriteContext context, Type type, TypeLocation location) { IAnnotationBinding [] annotationBindings = binding.getTypeAnnotations(); if (annotationBindings != null && annotationBindings.length > 0 && type instanceof AnnotatableType) { annotateList(((AnnotatableType) type).annotations(), annotationBindings, ast, context, location, binding); } return type; }
private Type annotateType(ITypeBinding binding, AST ast, ImportRewriteContext context, Type type) { IAnnotationBinding [] annotationBindings = binding.getTypeAnnotations(); if (annotationBindings != null && annotationBindings.length > 0 && type instanceof AnnotatableType) { annotateList(((AnnotatableType) type).annotations(), annotationBindings, ast, context); } return type; }
private Type annotateType(ITypeBinding binding, AST ast, ImportRewriteContext context, Type type, TypeLocation location) { IAnnotationBinding [] annotationBindings = binding.getTypeAnnotations(); if (annotationBindings != null && annotationBindings.length > 0 && type instanceof AnnotatableType) { annotateList(((AnnotatableType) type).annotations(), annotationBindings, ast, context, location, binding); } return type; }
private Type annotateType(ITypeBinding binding, AST ast, ImportRewriteContext context, Type type) { IAnnotationBinding [] annotationBindings = binding.getTypeAnnotations(); if (annotationBindings != null && annotationBindings.length > 0 && type instanceof AnnotatableType) { annotateList(((AnnotatableType) type).annotations(), annotationBindings, ast, context); } return type; }
private Type annotateType(ITypeBinding binding, AST ast, ImportRewriteContext context, Type type) { IAnnotationBinding [] annotationBindings = binding.getTypeAnnotations(); if (annotationBindings != null && annotationBindings.length > 0 && type instanceof AnnotatableType) { annotateList(((AnnotatableType) type).annotations(), annotationBindings, ast, context); } return type; }
private ITypeBinding checkAnnotationAndGenerics(ITypeBinding binding) { ITypeBinding bindingPoint = null; while (binding != null) { IAnnotationBinding annotationBinding [] = binding.getTypeAnnotations(); ITypeBinding [] typeArguments = binding.getTypeArguments(); if ((annotationBinding != null && annotationBinding.length > 0) || (typeArguments != null && typeArguments.length > 0)) { bindingPoint = binding; } if (binding.isMember()) { binding = binding.getDeclaringClass(); } else { break; } } return bindingPoint; }
private ITypeBinding checkAnnotationAndGenerics(ITypeBinding binding) { ITypeBinding bindingPoint = null; while (binding != null) { IAnnotationBinding annotationBinding [] = binding.getTypeAnnotations(); ITypeBinding [] typeArguments = binding.getTypeArguments(); if ((annotationBinding != null && annotationBinding.length > 0) || (typeArguments != null && typeArguments.length > 0)) { bindingPoint = binding; } if (binding.isMember()) { binding = binding.getDeclaringClass(); } else { break; } } return bindingPoint; }
private ITypeBinding checkAnnotationAndGenerics(ITypeBinding binding) { ITypeBinding bindingPoint = null; while (binding != null) { IAnnotationBinding annotationBinding [] = binding.getTypeAnnotations(); ITypeBinding [] typeArguments = binding.getTypeArguments(); if ((annotationBinding != null && annotationBinding.length > 0) || (typeArguments != null && typeArguments.length > 0)) { bindingPoint = binding; } if (binding.isMember()) { binding = binding.getDeclaringClass(); } else { break; } } return bindingPoint; }
private ITypeBinding checkAnnotationAndGenerics(ITypeBinding binding) { ITypeBinding bindingPoint = null; while (binding != null) { IAnnotationBinding annotationBinding [] = binding.getTypeAnnotations(); ITypeBinding [] typeArguments = binding.getTypeArguments(); if ((annotationBinding != null && annotationBinding.length > 0) || (typeArguments != null && typeArguments.length > 0)) { bindingPoint = binding; } if (binding.isMember()) { binding = binding.getDeclaringClass(); } else { break; } } return bindingPoint; }
private ITypeBinding checkAnnotationAndGenerics(ITypeBinding binding) { ITypeBinding bindingPoint = null; while (binding != null) { IAnnotationBinding annotationBinding [] = binding.getTypeAnnotations(); ITypeBinding [] typeArguments = binding.getTypeArguments(); if ((annotationBinding != null && annotationBinding.length > 0) || (typeArguments != null && typeArguments.length > 0)) { bindingPoint = binding; } if (binding.isMember()) { binding = binding.getDeclaringClass(); } else { break; } } return bindingPoint; }
private Type getArrayType(Type elementType, AST ast, ImportRewriteContext context, ITypeBinding normalizedBinding) { int noDimensions = normalizedBinding.getDimensions(); ArrayType arrayType = ast.newArrayType(elementType, noDimensions); if (ast.apiLevel() >= AST.JLS8) { for (int i = 0; i < noDimensions; i++) { IAnnotationBinding[] typeAnnotations = normalizedBinding.getTypeAnnotations(); if (typeAnnotations.length > 0) { Dimension dimension = (Dimension) arrayType.dimensions().get(i); annotateList(dimension.annotations(), typeAnnotations, ast, context); } normalizedBinding = normalizedBinding.getComponentType(); } } return arrayType; }
private Type getArrayType(Type elementType, AST ast, ImportRewriteContext context, ITypeBinding normalizedBinding, TypeLocation location) { int noDimensions = normalizedBinding.getDimensions(); ArrayType arrayType = ast.newArrayType(elementType, noDimensions); if (ast.apiLevel() >= JLS8_INTERNAL) { for (int i = 0; i < noDimensions; i++) { IAnnotationBinding[] typeAnnotations = normalizedBinding.getTypeAnnotations(); if (typeAnnotations.length > 0) { Dimension dimension = (Dimension) arrayType.dimensions().get(i); annotateList(dimension.annotations(), typeAnnotations, ast, context, i == 0 ? location : TypeLocation.ARRAY_CONTENTS, normalizedBinding); } normalizedBinding = normalizedBinding.getComponentType(); } } return arrayType; }
private Type getArrayType(Type elementType, AST ast, ImportRewriteContext context, ITypeBinding normalizedBinding) { int noDimensions = normalizedBinding.getDimensions(); ArrayType arrayType = ast.newArrayType(elementType, noDimensions); if (ast.apiLevel() >= AST.JLS8) { for (int i = 0; i < noDimensions; i++) { IAnnotationBinding[] typeAnnotations = normalizedBinding.getTypeAnnotations(); if (typeAnnotations.length > 0) { Dimension dimension = (Dimension) arrayType.dimensions().get(i); annotateList(dimension.annotations(), typeAnnotations, ast, context); } normalizedBinding = normalizedBinding.getComponentType(); } } return arrayType; }
private Type getArrayType(Type elementType, AST ast, ImportRewriteContext context, ITypeBinding normalizedBinding) { int noDimensions = normalizedBinding.getDimensions(); ArrayType arrayType = ast.newArrayType(elementType, noDimensions); if (ast.apiLevel() >= AST.JLS8) { for (int i = 0; i < noDimensions; i++) { IAnnotationBinding[] typeAnnotations = normalizedBinding.getTypeAnnotations(); if (typeAnnotations.length > 0) { Dimension dimension = (Dimension) arrayType.dimensions().get(i); annotateList(dimension.annotations(), typeAnnotations, ast, context); } normalizedBinding = normalizedBinding.getComponentType(); } } return arrayType; }
private Type createBaseType(AST ast, ImportRewriteContext context, ITypeBinding normalizedBinding) { Type type; IAnnotationBinding annotationBinding [] = normalizedBinding.getTypeAnnotations(); boolean annotsPresent = annotationBinding != null && annotationBinding.length > 0; String qualifiedName= getRawQualifiedName(normalizedBinding); String res = qualifiedName.length() > 0 ? internalAddImport(qualifiedName, context) : getRawName(normalizedBinding); if (annotsPresent) { int dotIndex = res != null ? res.lastIndexOf('.') : -1; if (dotIndex > 0) { Name nameQualifier = ast.newName(res.substring(0, dotIndex)); SimpleName simpleName = ast.newSimpleName(res.substring(dotIndex + 1)); type = ast.newNameQualifiedType(nameQualifier, simpleName); } else { type = ast.newSimpleType(ast.newName(res)); } annotateList(((AnnotatableType) type).annotations(), annotationBinding, ast, context); } else { type = ast.newSimpleType(ast.newName(res)); } return type; }
private Type createBaseType(AST ast, ImportRewriteContext context, ITypeBinding normalizedBinding) { Type type; IAnnotationBinding annotationBinding [] = normalizedBinding.getTypeAnnotations(); boolean annotsPresent = annotationBinding != null && annotationBinding.length > 0; String qualifiedName= getRawQualifiedName(normalizedBinding); String res = qualifiedName.length() > 0 ? internalAddImport(qualifiedName, context) : getRawName(normalizedBinding); if (annotsPresent) { int dotIndex = res != null ? res.lastIndexOf('.') : -1; if (dotIndex > 0) { Name nameQualifier = ast.newName(res.substring(0, dotIndex)); SimpleName simpleName = ast.newSimpleName(res.substring(dotIndex + 1)); type = ast.newNameQualifiedType(nameQualifier, simpleName); } else { type = ast.newSimpleType(ast.newName(res)); } annotateList(((AnnotatableType) type).annotations(), annotationBinding, ast, context); } else { type = ast.newSimpleType(ast.newName(res)); } return type; }
private Type createBaseType(AST ast, ImportRewriteContext context, ITypeBinding normalizedBinding) { Type type; IAnnotationBinding annotationBinding [] = normalizedBinding.getTypeAnnotations(); boolean annotsPresent = annotationBinding != null && annotationBinding.length > 0; String qualifiedName= getRawQualifiedName(normalizedBinding); String res = qualifiedName.length() > 0 ? internalAddImport(qualifiedName, context) : getRawName(normalizedBinding); if (annotsPresent) { int dotIndex = res != null ? res.lastIndexOf('.') : -1; if (dotIndex > 0) { Name nameQualifier = ast.newName(res.substring(0, dotIndex)); SimpleName simpleName = ast.newSimpleName(res.substring(dotIndex + 1)); type = ast.newNameQualifiedType(nameQualifier, simpleName); } else { type = ast.newSimpleType(ast.newName(res)); } annotateList(((AnnotatableType) type).annotations(), annotationBinding, ast, context); } else { type = ast.newSimpleType(ast.newName(res)); } return type; }
private Type getArrayType(Type elementType, AST ast, ImportRewriteContext context, ITypeBinding normalizedBinding, TypeLocation location) { int noDimensions = normalizedBinding.getDimensions(); ArrayType arrayType = ast.newArrayType(elementType, noDimensions); if (ast.apiLevel() >= JLS8_INTERNAL) { for (int i = 0; i < noDimensions; i++) { IAnnotationBinding[] typeAnnotations = normalizedBinding.getTypeAnnotations(); if (typeAnnotations.length > 0) { Dimension dimension = (Dimension) arrayType.dimensions().get(i); annotateList(dimension.annotations(), typeAnnotations, ast, context, i == 0 ? location : TypeLocation.ARRAY_CONTENTS, normalizedBinding); } normalizedBinding = normalizedBinding.getComponentType(); } } return arrayType; }
private Type createBaseType(AST ast, ImportRewriteContext context, ITypeBinding normalizedBinding, TypeLocation location) { Type type; IAnnotationBinding annotationBinding [] = normalizedBinding.getTypeAnnotations(); boolean annotsPresent = annotationBinding != null && annotationBinding.length > 0; String qualifiedName= getRawQualifiedName(normalizedBinding); String res = qualifiedName.length() > 0 ? internalAddImport(qualifiedName, context) : getRawName(normalizedBinding); if (annotsPresent) { int dotIndex = res != null ? res.lastIndexOf('.') : -1; if (dotIndex > 0) { Name nameQualifier = ast.newName(res.substring(0, dotIndex)); SimpleName simpleName = ast.newSimpleName(res.substring(dotIndex + 1)); type = ast.newNameQualifiedType(nameQualifier, simpleName); } else { type = ast.newSimpleType(ast.newName(res)); } annotateList(((AnnotatableType) type).annotations(), annotationBinding, ast, context, location, normalizedBinding); } else { type = ast.newSimpleType(ast.newName(res)); } return type; }
private Type createBaseType(AST ast, ImportRewriteContext context, ITypeBinding normalizedBinding, TypeLocation location) { Type type; IAnnotationBinding annotationBinding [] = normalizedBinding.getTypeAnnotations(); boolean annotsPresent = annotationBinding != null && annotationBinding.length > 0; String qualifiedName= getRawQualifiedName(normalizedBinding); String res = qualifiedName.length() > 0 ? internalAddImport(qualifiedName, context) : getRawName(normalizedBinding); if (annotsPresent) { int dotIndex = res != null ? res.lastIndexOf('.') : -1; if (dotIndex > 0) { Name nameQualifier = ast.newName(res.substring(0, dotIndex)); SimpleName simpleName = ast.newSimpleName(res.substring(dotIndex + 1)); type = ast.newNameQualifiedType(nameQualifier, simpleName); } else { type = ast.newSimpleType(ast.newName(res)); } annotateList(((AnnotatableType) type).annotations(), annotationBinding, ast, context, location, normalizedBinding); } else { type = ast.newSimpleType(ast.newName(res)); } return type; }