annotate graal/com.oracle.jvmci.debug/src/com/oracle/jvmci/debug/AnsiColor.java @ 21780:3d15183f3c93

Introduce Compiler interface in jvmci. Use it from jvmci.hotspot.CompilationTask
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Wed, 03 Jun 2015 15:47:54 +0200
parents b1530a6cce8c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
1 /*
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
2 * Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved.
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
4 *
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
7 * published by the Free Software Foundation.
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
8 *
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
13 * accompanied this code).
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
14 *
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
18 *
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
21 * questions.
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
22 */
21554
b1530a6cce8c renamed com.oracle.graal.[debug|options|hotspotvmconfig]* modules to com.oracle.jvmci.[debug|options|hotspotvmconfig]* modules (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 18163
diff changeset
23 package com.oracle.jvmci.debug;
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
24
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
25 /**
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
26 * Ansi terminal color escape codes.
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
27 */
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
28 public final class AnsiColor {
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
29 /** Foreground black. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
30 public static final String BLACK = "\u001b[30m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
31 /** Foreground red. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
32 public static final String RED = "\u001b[31m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
33 /** Foreground green. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
34 public static final String GREEN = "\u001b[32m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
35 /** Foreground yellow. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
36 public static final String YELLOW = "\u001b[33m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
37 /** Foreground blue. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
38 public static final String BLUE = "\u001b[34m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
39 /** Foreground magenta. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
40 public static final String MAGENTA = "\u001b[35m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
41 /** Foreground cyan. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
42 public static final String CYAN = "\u001b[36m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
43 /** Foreground white. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
44 public static final String WHITE = "\u001b[37m";
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
45
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
46 /** Foreground bold black. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
47 public static final String BOLD_BLACK = "\u001b[30;1m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
48 /** Foreground bold red. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
49 public static final String BOLD_RED = "\u001b[31;1m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
50 /** Foreground bold green. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
51 public static final String BOLD_GREEN = "\u001b[32;1m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
52 /** Foreground bold yellow. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
53 public static final String BOLD_YELLOW = "\u001b[33;1m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
54 /** Foreground bold blue. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
55 public static final String BOLD_BLUE = "\u001b[34;1m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
56 /** Foreground bold magenta. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
57 public static final String BOLD_MAGENTA = "\u001b[35;1m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
58 /** Foreground bold cyan. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
59 public static final String BOLD_CYAN = "\u001b[36;1m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
60 /** Foreground bold white. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
61 public static final String BOLD_WHITE = "\u001b[37;1m";
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
62
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
63 /** Background black. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
64 public static final String BG_BLACK = "\u001b[40m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
65 /** Background red. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
66 public static final String BG_RED = "\u001b[41m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
67 /** Background green. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
68 public static final String BG_GREEN = "\u001b[42m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
69 /** Background yellow. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
70 public static final String BG_YELLOW = "\u001b[43m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
71 /** Background blue. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
72 public static final String BG_BLUE = "\u001b[44m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
73 /** Background magenta. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
74 public static final String BG_MAGENTA = "\u001b[45m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
75 /** Background cyan. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
76 public static final String BG_CYAN = "\u001b[46m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
77 /** Background white. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
78 public static final String BG_WHITE = "\u001b[47m";
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
79
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
80 /** Reset. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
81 public static final String RESET = "\u001b[0m";
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
82 /** Underline. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
83 public static final String UNDERLINED = "\u001b[4m";
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
84
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 15654
diff changeset
85 /** Prevent instantiation. */
15654
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
86 private AnsiColor() {
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
87 }
4735aabe8444 Add AnsiColor.
Josef Eisl <josef.eisl@jku.at>
parents:
diff changeset
88 }