105878b6cb86f32245891d6e4504a8b1e7fcd2155cushon/*
205878b6cb86f32245891d6e4504a8b1e7fcd2155cushon * Copyright 2016 Google Inc. All Rights Reserved.
305878b6cb86f32245891d6e4504a8b1e7fcd2155cushon *
405878b6cb86f32245891d6e4504a8b1e7fcd2155cushon * Licensed under the Apache License, Version 2.0 (the "License");
505878b6cb86f32245891d6e4504a8b1e7fcd2155cushon * you may not use this file except in compliance with the License.
605878b6cb86f32245891d6e4504a8b1e7fcd2155cushon * You may obtain a copy of the License at
705878b6cb86f32245891d6e4504a8b1e7fcd2155cushon *
805878b6cb86f32245891d6e4504a8b1e7fcd2155cushon *     http://www.apache.org/licenses/LICENSE-2.0
905878b6cb86f32245891d6e4504a8b1e7fcd2155cushon *
1005878b6cb86f32245891d6e4504a8b1e7fcd2155cushon * Unless required by applicable law or agreed to in writing, software
1105878b6cb86f32245891d6e4504a8b1e7fcd2155cushon * distributed under the License is distributed on an "AS IS" BASIS,
1205878b6cb86f32245891d6e4504a8b1e7fcd2155cushon * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1305878b6cb86f32245891d6e4504a8b1e7fcd2155cushon * See the License for the specific language governing permissions and
1405878b6cb86f32245891d6e4504a8b1e7fcd2155cushon * limitations under the License.
1505878b6cb86f32245891d6e4504a8b1e7fcd2155cushon */
1605878b6cb86f32245891d6e4504a8b1e7fcd2155cushon
1705878b6cb86f32245891d6e4504a8b1e7fcd2155cushonpackage com.google.turbine.binder.bound;
1805878b6cb86f32245891d6e4504a8b1e7fcd2155cushon
1905878b6cb86f32245891d6e4504a8b1e7fcd2155cushonimport com.google.turbine.binder.sym.FieldSymbol;
2005878b6cb86f32245891d6e4504a8b1e7fcd2155cushonimport com.google.turbine.model.Const;
2105878b6cb86f32245891d6e4504a8b1e7fcd2155cushon
2205878b6cb86f32245891d6e4504a8b1e7fcd2155cushon/** An enum constant. */
2305878b6cb86f32245891d6e4504a8b1e7fcd2155cushonpublic class EnumConstantValue extends Const {
2405878b6cb86f32245891d6e4504a8b1e7fcd2155cushon
2505878b6cb86f32245891d6e4504a8b1e7fcd2155cushon  private final FieldSymbol sym;
2605878b6cb86f32245891d6e4504a8b1e7fcd2155cushon
2705878b6cb86f32245891d6e4504a8b1e7fcd2155cushon  public EnumConstantValue(FieldSymbol sym) {
2805878b6cb86f32245891d6e4504a8b1e7fcd2155cushon    this.sym = sym;
2905878b6cb86f32245891d6e4504a8b1e7fcd2155cushon  }
3005878b6cb86f32245891d6e4504a8b1e7fcd2155cushon
3105878b6cb86f32245891d6e4504a8b1e7fcd2155cushon  public FieldSymbol sym() {
3205878b6cb86f32245891d6e4504a8b1e7fcd2155cushon    return sym;
3305878b6cb86f32245891d6e4504a8b1e7fcd2155cushon  }
3405878b6cb86f32245891d6e4504a8b1e7fcd2155cushon
3505878b6cb86f32245891d6e4504a8b1e7fcd2155cushon  @Override
3605878b6cb86f32245891d6e4504a8b1e7fcd2155cushon  public Kind kind() {
3705878b6cb86f32245891d6e4504a8b1e7fcd2155cushon    return Kind.ENUM_CONSTANT;
3805878b6cb86f32245891d6e4504a8b1e7fcd2155cushon  }
3905878b6cb86f32245891d6e4504a8b1e7fcd2155cushon}
40