blob: f761ae31ea87dc1616001468f3989d3d06588955 [file] [log] [blame]
Andreas Huber1aec3972016-08-26 09:26:32 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
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
Andreas Huberc9410c72016-07-28 12:18:40 -070017#ifndef NAMED_TYPE_H_
18
19#define NAMED_TYPE_H_
20
21#include "Type.h"
22
Andreas Huber31629bc2016-08-03 09:06:40 -070023#include "FQName.h"
24
Andreas Huberc9410c72016-07-28 12:18:40 -070025#include <string>
26
27namespace android {
28
29struct NamedType : public Type {
Andreas Huber9ed827c2016-08-22 12:31:13 -070030 NamedType(const char *localName);
Andreas Huber31629bc2016-08-03 09:06:40 -070031
Andreas Huber39fa7182016-08-19 14:27:33 -070032 bool isNamedType() const override;
33
Andreas Huber31629bc2016-08-03 09:06:40 -070034 void setFullName(const FQName &fullName);
Andreas Huberc9410c72016-07-28 12:18:40 -070035
Andreas Huberbfd76212016-08-09 11:12:16 -070036 const FQName &fqName() const;
Andreas Huber0e00de42016-08-03 09:56:02 -070037 std::string localName() const;
Andreas Huber31629bc2016-08-03 09:06:40 -070038 std::string fullName() const;
Andreas Huber2831d512016-08-15 09:33:47 -070039 std::string fullJavaName() const;
Andreas Huberc9410c72016-07-28 12:18:40 -070040
41private:
Andreas Huber31629bc2016-08-03 09:06:40 -070042 std::string mLocalName;
43 FQName mFullName;
Andreas Huberc9410c72016-07-28 12:18:40 -070044
45 DISALLOW_COPY_AND_ASSIGN(NamedType);
46};
47
48} // namespace android
49
50#endif // NAMED_TYPE_H_
51