RecoveredTypeBinding(BindingResolver resolver, org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding) { this.resolver = resolver; this.dimensions = typeBinding.dimensions(); this.binding = typeBinding; }
RecoveredTypeBinding(BindingResolver resolver, org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding) { this.resolver = resolver; this.dimensions = typeBinding.dimensions(); this.binding = typeBinding; }
RecoveredTypeBinding(BindingResolver resolver, org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding) { this.resolver = resolver; this.dimensions = typeBinding.dimensions(); this.binding = typeBinding; }
RecoveredTypeBinding(BindingResolver resolver, org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding) { this.resolver = resolver; this.dimensions = typeBinding.dimensions(); this.binding = typeBinding; }
private TypeBinding peelOneDimension(TypeBinding arrayType, LookupEnvironment env) { if (arrayType.dimensions() == 1) return arrayType.leafComponentType(); return env.createArrayType(arrayType.leafComponentType(), arrayType.dimensions()-1); }
arrayref = this.jdtTreeBuilder.getFactory().Core().createArrayTypeReference(); ref = arrayref; for (int i = 1; i < binding.dimensions(); i++) { CtArrayTypeReference<Object> tmp = this.jdtTreeBuilder.getFactory().Core().createArrayTypeReference(); arrayref.setComponentType(tmp);
public final boolean isMain() { if (this.selector.length == 4 && CharOperation.equals(this.selector, TypeConstants.MAIN) && ((this.modifiers & (ClassFileConstants.AccPublic | ClassFileConstants.AccStatic)) != 0) && TypeBinding.VOID == this.returnType && this.parameters.length == 1) { TypeBinding paramType = this.parameters[0]; if (paramType.dimensions() == 1 && paramType.leafComponentType().id == TypeIds.T_JavaLangString) { return true; } } return false; }
public final boolean isMain() { if (this.selector.length == 4 && CharOperation.equals(this.selector, TypeConstants.MAIN) && ((this.modifiers & (ClassFileConstants.AccPublic | ClassFileConstants.AccStatic)) != 0) && TypeBinding.VOID == this.returnType && this.parameters.length == 1) { TypeBinding paramType = this.parameters[0]; if (paramType.dimensions() == 1 && paramType.leafComponentType().id == TypeIds.T_JavaLangString) { return true; } } return false; }
public final boolean isMain() { if (this.selector.length == 4 && CharOperation.equals(this.selector, TypeConstants.MAIN) && ((this.modifiers & (ClassFileConstants.AccPublic | ClassFileConstants.AccStatic)) != 0) && TypeBinding.VOID == this.returnType && this.parameters.length == 1) { TypeBinding paramType = this.parameters[0]; if (paramType.dimensions() == 1 && paramType.leafComponentType().id == TypeIds.T_JavaLangString) { return true; } } return false; }
public final boolean isMain() { if (this.selector.length == 4 && CharOperation.equals(this.selector, TypeConstants.MAIN) && ((this.modifiers & (ClassFileConstants.AccPublic | ClassFileConstants.AccStatic)) != 0) && TypeBinding.VOID == this.returnType && this.parameters.length == 1) { TypeBinding paramType = this.parameters[0]; if (paramType.dimensions() == 1 && paramType.leafComponentType().id == TypeIds.T_JavaLangString) { return true; } } return false; }
public final boolean isMain() { if (this.selector.length == 4 && CharOperation.equals(this.selector, TypeConstants.MAIN) && ((this.modifiers & (ClassFileConstants.AccPublic | ClassFileConstants.AccStatic)) != 0) && TypeBinding.VOID == this.returnType && this.parameters.length == 1) { TypeBinding paramType = this.parameters[0]; if (paramType.dimensions() == 1 && paramType.leafComponentType().id == TypeIds.T_JavaLangString) { return true; } } return false; }
public final boolean isMain() { if (this.selector.length == 4 && CharOperation.equals(this.selector, TypeConstants.MAIN) && ((this.modifiers & (ClassFileConstants.AccPublic | ClassFileConstants.AccStatic)) != 0) && TypeBinding.VOID == this.returnType && this.parameters.length == 1) { TypeBinding paramType = this.parameters[0]; if (paramType.dimensions() == 1 && paramType.leafComponentType().id == TypeIds.T_JavaLangString) { return true; } } return false; }
public final boolean isMain() { if (this.selector.length == 4 && CharOperation.equals(this.selector, TypeConstants.MAIN) && ((this.modifiers & (ClassFileConstants.AccPublic | ClassFileConstants.AccStatic)) != 0) && TypeBinding.VOID == this.returnType && this.parameters.length == 1) { TypeBinding paramType = this.parameters[0]; if (paramType.dimensions() == 1 && paramType.leafComponentType().id == TypeIds.T_JavaLangString) { return true; } } return false; }
public final boolean isMain() { if (this.selector.length == 4 && CharOperation.equals(this.selector, TypeConstants.MAIN) && ((this.modifiers & (ClassFileConstants.AccPublic | ClassFileConstants.AccStatic)) != 0) && TypeBinding.VOID == this.returnType && this.parameters.length == 1) { TypeBinding paramType = this.parameters[0]; if (paramType.dimensions() == 1 && paramType.leafComponentType().id == TypeIds.T_JavaLangString) { return true; } } return false; }
public final boolean isMain() { if (this.selector.length == 4 && CharOperation.equals(this.selector, TypeConstants.MAIN) && ((this.modifiers & (ClassFileConstants.AccPublic | ClassFileConstants.AccStatic)) != 0) && TypeBinding.VOID == this.returnType && this.parameters.length == 1) { TypeBinding paramType = this.parameters[0]; if (paramType.dimensions() == 1 && paramType.leafComponentType().id == TypeIds.T_JavaLangString) { return true; } } return false; }
@Override public ArrayType getArrayType(TypeMirror componentType) { TypeMirrorImpl typeMirrorImpl = (TypeMirrorImpl) componentType; TypeBinding typeBinding = (TypeBinding) typeMirrorImpl._binding; return (ArrayType) _env.getFactory().newTypeMirror( this._env.getLookupEnvironment().createArrayType( typeBinding.leafComponentType(), typeBinding.dimensions() + 1)); }
@Override public ArrayType getArrayType(TypeMirror componentType) { TypeMirrorImpl typeMirrorImpl = (TypeMirrorImpl) componentType; TypeBinding typeBinding = (TypeBinding) typeMirrorImpl._binding; return (ArrayType) _env.getFactory().newTypeMirror( this._env.getLookupEnvironment().createArrayType( typeBinding.leafComponentType(), typeBinding.dimensions() + 1)); }
@Override public ArrayType getArrayType(TypeMirror componentType) { TypeMirrorImpl typeMirrorImpl = (TypeMirrorImpl) componentType; TypeBinding typeBinding = (TypeBinding) typeMirrorImpl._binding; return (ArrayType) _env.getFactory().newTypeMirror( this._env.getLookupEnvironment().createArrayType( typeBinding.leafComponentType(), typeBinding.dimensions() + 1)); }
private static TypeBinding getRealErasure(TypeBinding type, LookupEnvironment environment) { TypeBinding erasure = type.erasure(); // could still be / contain a generic type that needs to be converted to raw: TypeBinding erasedLeaf = erasure.leafComponentType(); if (erasedLeaf.isGenericType()) erasedLeaf = environment.convertToRawType(erasedLeaf, false); if (erasure.isArrayType()) return environment.createArrayType(erasedLeaf, erasure.dimensions()); return erasedLeaf; }
private static TypeBinding getRealErasure(TypeBinding type, LookupEnvironment environment) { TypeBinding erasure = type.erasure(); // could still be / contain a generic type that needs to be converted to raw: TypeBinding erasedLeaf = erasure.leafComponentType(); if (erasedLeaf.isGenericType()) erasedLeaf = environment.convertToRawType(erasedLeaf, false); if (erasure.isArrayType()) return environment.createArrayType(erasedLeaf, erasure.dimensions()); return erasedLeaf; }