1 /******************************************************************************* 2 * Copyright (c) 2007 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.jdt.core; 12 13 /** 14 * Utility class for decoding additional flags in completion proposal. 15 * <p> 16 * This class provides static methods only; it is not intended to be 17 * instantiated or subclassed by clients. 18 * </p> 19 * 20 * @see CompletionProposal#getAdditionalFlags() 21 * 22 * @since 3.3 23 */ 24 public final class CompletionFlags { 25 /** 26 * Constant representing the absence of any flag 27 */ 28 public static final int Default = 0x0000; 29 30 /** 31 * Constant representing a static import 32 */ 33 public static final int StaticImport = 0x0001; 34 35 /** 36 * Not instantiable. 37 */ 38 private CompletionFlags() { 39 // Not instantiable 40 } 41 42 /** 43 * Returns whether the given integer includes the {@link #StaticImport} flag. 44 * 45 * @param flags the flags 46 * @return <code>true</code> if the {@link #StaticImport} flag is included 47 */ 48 public static boolean isStaticImport(int flags) { 49 return (flags & StaticImport) != 0; 50 } 51 } 52