2 * Copyright 2004-2008 the Seasar Foundation and the Others.
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
\r
13 * either express or implied. See the License for the specific language
\r
14 * governing permissions and limitations under the License.
\r
16 package org.seasar.extension.jdbc.gen.internal.util;
\r
18 import java.lang.reflect.Field;
\r
20 import org.seasar.framework.env.Env;
\r
21 import org.seasar.framework.util.tiger.ReflectionUtil;
\r
24 * {@link Env}に関するユーティリティクラスです。
\r
28 public class EnvUtil {
\r
30 /** 環境名と環境名以外の区切り文字 */
\r
31 public static char DELIMITER = '#';
\r
33 /** {@link Env}の環境名を保持するフィールド */
\r
34 protected static Field VALUE_FIELD;
\r
36 VALUE_FIELD = ReflectionUtil.getDeclaredField(Env.class, "value");
\r
37 VALUE_FIELD.setAccessible(true);
\r
43 protected EnvUtil() {
\r
51 public static String getValue() {
\r
52 return ReflectionUtil.getStaticValue(VALUE_FIELD);
\r
61 public static void setValue(String value) {
\r
62 ReflectionUtil.setStaticValue(VALUE_FIELD, value);
\r