blob: bfde0bf55f1ea96b2cc61f21ec93058873eba013 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2005, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
*******************************************************************************/
package org.eclipse.dltk.core;
import org.eclipse.dltk.ast.Modifiers;
public class Flags implements Modifiers {
/**
* Returns whether the given integer includes the <code>private</code> modifier.
*
* @param flags the flags
* @return <code>true</code> if the <code>private</code> modifier is included
*/
public static boolean isPrivate(int flags) {
return (flags & AccPrivate) != 0;
}
/**
* Returns whether the given integer includes the <code>protected</code> modifier.
*
* @param flags the flags
* @return <code>true</code> if the <code>protected</code> modifier is included
*/
public static boolean isProtected(int flags) {
return (flags & AccProtected) != 0;
}
/**
* Returns whether the given integer includes the <code>public</code> modifier.
*
* @param flags the flags
* @return <code>true</code> if the <code>public</code> modifier is included
*/
public static boolean isPublic(int flags) {
return (flags & AccPublic) != 0;
}
/**
* Returns whether the given integer includes the <code>static</code> modifier.
*
* @param flags the flags
* @return <code>true</code> if the <code>static</code> modifier is included
*/
public static boolean isStatic(int flags) {
return (flags & AccStatic) != 0;
}
}