diff options
author | cushon <cushon@google.com> | 2016-10-27 17:58:37 -0700 |
---|---|---|
committer | Liam Miller-Cushon <cushon@google.com> | 2016-10-27 18:09:31 -0700 |
commit | 05878b6cb86f32245891d6e4504a8b1e7fcd2155 (patch) | |
tree | 34b22eb7c72ebd741b5e72629ea78f87f275bfb7 /java/com/google/turbine/binder/bound/EnumConstantValue.java | |
parent | 84213d0af45dfb55e638e2ee1f36007e7bfe5a02 (diff) | |
download | turbine-05878b6cb86f32245891d6e4504a8b1e7fcd2155.tar.gz |
Refactor in preparation for type annotation support
Types will soon depend on annotations, which depend on constants, which
may have types. Untangle that by moving bound non-primitive constants
(enums, annotations, class literals) to the bound node package, and
moving annotation info into the type package.
MOE_MIGRATED_REVID=137465249
Diffstat (limited to 'java/com/google/turbine/binder/bound/EnumConstantValue.java')
-rw-r--r-- | java/com/google/turbine/binder/bound/EnumConstantValue.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/java/com/google/turbine/binder/bound/EnumConstantValue.java b/java/com/google/turbine/binder/bound/EnumConstantValue.java new file mode 100644 index 0000000..07bb29c --- /dev/null +++ b/java/com/google/turbine/binder/bound/EnumConstantValue.java @@ -0,0 +1,39 @@ +/* + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.turbine.binder.bound; + +import com.google.turbine.binder.sym.FieldSymbol; +import com.google.turbine.model.Const; + +/** An enum constant. */ +public class EnumConstantValue extends Const { + + private final FieldSymbol sym; + + public EnumConstantValue(FieldSymbol sym) { + this.sym = sym; + } + + public FieldSymbol sym() { + return sym; + } + + @Override + public Kind kind() { + return Kind.ENUM_CONSTANT; + } +} |