annotate src/share/vm/ci/ciFlags.hpp @ 1879:f95d63e2154a

6989984: Use standard include model for Hospot Summary: Replaced MakeDeps and the includeDB files with more standardized solutions. Reviewed-by: coleenp, kvn, kamg
author stefank
date Tue, 23 Nov 2010 13:22:55 -0800
parents c18cbe5936b8
children edb5ab0f3fe5
rev   line source
duke@0 1 /*
stefank@1879 2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
duke@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 *
duke@0 5 * This code is free software; you can redistribute it and/or modify it
duke@0 6 * under the terms of the GNU General Public License version 2 only, as
duke@0 7 * published by the Free Software Foundation.
duke@0 8 *
duke@0 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@0 13 * accompanied this code).
duke@0 14 *
duke@0 15 * You should have received a copy of the GNU General Public License version
duke@0 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@0 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 18 *
trims@1472 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1472 20 * or visit www.oracle.com if you need additional information or have any
trims@1472 21 * questions.
duke@0 22 *
duke@0 23 */
duke@0 24
stefank@1879 25 #ifndef SHARE_VM_CI_CIFLAGS_HPP
stefank@1879 26 #define SHARE_VM_CI_CIFLAGS_HPP
stefank@1879 27
stefank@1879 28 #include "ci/ciClassList.hpp"
stefank@1879 29 #include "memory/allocation.hpp"
stefank@1879 30 #include "prims/jvm.h"
stefank@1879 31 #include "utilities/accessFlags.hpp"
stefank@1879 32
duke@0 33 // ciFlags
duke@0 34 //
duke@0 35 // This class represents klass or method flags.
duke@0 36 class ciFlags VALUE_OBJ_CLASS_SPEC {
duke@0 37 private:
duke@0 38 friend class ciInstanceKlass;
duke@0 39 friend class ciField;
duke@0 40 friend class ciMethod;
duke@0 41
duke@0 42 jint _flags;
duke@0 43
duke@0 44 ciFlags() { _flags = 0; }
duke@0 45 ciFlags(AccessFlags flags) { _flags = flags.as_int(); }
duke@0 46
duke@0 47 public:
duke@0 48 // Java access flags
duke@0 49 bool is_public () const { return (_flags & JVM_ACC_PUBLIC ) != 0; }
duke@0 50 bool is_private () const { return (_flags & JVM_ACC_PRIVATE ) != 0; }
duke@0 51 bool is_protected () const { return (_flags & JVM_ACC_PROTECTED ) != 0; }
duke@0 52 bool is_static () const { return (_flags & JVM_ACC_STATIC ) != 0; }
duke@0 53 bool is_final () const { return (_flags & JVM_ACC_FINAL ) != 0; }
duke@0 54 bool is_synchronized() const { return (_flags & JVM_ACC_SYNCHRONIZED) != 0; }
duke@0 55 bool is_super () const { return (_flags & JVM_ACC_SUPER ) != 0; }
duke@0 56 bool is_volatile () const { return (_flags & JVM_ACC_VOLATILE ) != 0; }
duke@0 57 bool is_transient () const { return (_flags & JVM_ACC_TRANSIENT ) != 0; }
duke@0 58 bool is_native () const { return (_flags & JVM_ACC_NATIVE ) != 0; }
duke@0 59 bool is_interface () const { return (_flags & JVM_ACC_INTERFACE ) != 0; }
duke@0 60 bool is_abstract () const { return (_flags & JVM_ACC_ABSTRACT ) != 0; }
duke@0 61 bool is_strict () const { return (_flags & JVM_ACC_STRICT ) != 0; }
duke@0 62
duke@0 63 // Conversion
duke@0 64 jint as_int() { return _flags; }
duke@0 65
duke@0 66 void print_klass_flags(outputStream* st = tty);
duke@0 67 void print_member_flags(outputStream* st = tty);
duke@0 68 void print(outputStream* st = tty);
duke@0 69 };
stefank@1879 70
stefank@1879 71 #endif // SHARE_VM_CI_CIFLAGS_HPP