1/*
2 * Copyright 2016 Google Inc. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.google.turbine.binder.bound;
18
19import com.google.common.collect.ImmutableMap;
20import com.google.turbine.binder.sym.ClassSymbol;
21import com.google.turbine.model.TurbineTyKind;
22import javax.annotation.Nullable;
23
24/**
25 * The initial bound tree representation.
26 *
27 * <p>The interfaces for bound trees generally have two implementations: one for the sources being
28 * analyzed, and one for symbols backed by classes on the classpath.
29 */
30public interface BoundClass {
31  /** The kind of declared type (class, interface, enum, or annotation). */
32  TurbineTyKind kind();
33
34  /** The enclosing declaration for member types, or {@code null} for top-level declarations. */
35  @Nullable
36  ClassSymbol owner();
37
38  /** Class access bits (see JVMS table 4.1). */
39  int access();
40
41  /** Member type declarations, by simple name. */
42  ImmutableMap<String, ClassSymbol> children();
43}
44