File: java_lang.h

package info (click to toggle)
libxtc-rats-java 1.15.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 18,580 kB
  • sloc: java: 288,962; ansic: 20,406; ml: 14,775; makefile: 1,358; cpp: 621; sh: 352; xml: 259; perl: 123
file content (34 lines) | stat: -rw-r--r-- 867 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// java_lang.h            see license.txt for copyright and terms of use
// language options that the parser (etc.) is sensitive to

#ifndef JAVALANG_H
#define JAVALANG_H


// This type is used for options that nominally either allow or
// disallow some syntax, but can also trigger a warning.  Values of
// this type are intended to be tested like booleans in most places.
enum Bool3 {
  B3_FALSE = 0,      // syntax not allowed
  B3_TRUE = 1,       // accepted silently
  B3_WARN = 2,       // accept with a warning
};


class JavaLang {
public:
                     
private:     // funcs
  void setAllWarnings(bool enable);

public:      // funcs
  JavaLang() { }

  // set any B3_TRUE to B3_WARN
  void enableAllWarnings() { setAllWarnings(true); }

  // set any B3_WARN to B3_TRUE
  void disableAllWarnings() { setAllWarnings(false); }
};

#endif // JAVALANG_H