1 /*******************************************************************************
2  * Copyright (c) 2017 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.jdt.core.util;
15 
16 /**
17  * Description of a module's attributes as described in the JVM specifications.
18  *
19  * @noimplement This interface is not intended to be implemented by clients.
20  * @since 3.14
21  */
22 public interface IModuleAttribute extends IClassFileAttribute {
23 
24 	/**
25 	 * Answer back the module name index.
26 	 *
27 	 * @return the module name index
28 	 */
getModuleNameIndex()29 	int getModuleNameIndex();
30 
31 	/**
32 	 * Answer back the module name.
33 	 *
34 	 * @return the module name
35 	 */
getModuleName()36 	char[] getModuleName();
37 
38 	/**
39 	 * Answer back the module flags.
40 	 *
41 	 * @return the module flags
42 	 */
getModuleFlags()43 	int getModuleFlags();
44 
45 	/**
46 	 * Answer back the module version index.
47 	 *
48 	 * @return the module version index
49 	 */
getModuleVersionIndex()50 	int getModuleVersionIndex();
51 
52 	/**
53 	 * Answer back the module version string.
54 	 *
55 	 * @return the module version string
56 	 */
getModuleVersionValue()57 	public char[] getModuleVersionValue();
58 
59 	/**
60 	 * Answer back the requires count.
61 	 *
62 	 * @return the requires counts
63 	 */
getRequiresCount()64 	int getRequiresCount();
65 
66 	/**
67 	 * Answer back the array of requires infos of the .class file,
68 	 * an empty array if none.
69 	 *
70 	 * @return the array of requires infos of the .class file, an empty array if none
71 	 */
getRequiresInfo()72 	IRequiresInfo[] getRequiresInfo();
73 
74 	/**
75 	 * Answer back the exports count.
76 	 *
77 	 * @return the exports counts
78 	 */
getExportsCount()79 	int getExportsCount();
80 
81 	/**
82 	 * Answer back the array of exports infos of the .class file,
83 	 * an empty array if none.
84 	 *
85 	 * @return the array of exports infos of the .class file, an empty array if none
86 	 */
getExportsInfo()87 	IPackageVisibilityInfo[] getExportsInfo();
88 
89 	/**
90 	 * Answer back the opens count.
91 	 *
92 	 * @return the opens counts
93 	 */
getOpensCount()94 	int getOpensCount();
95 
96 	/**
97 	 * Answer back the array of opens infos of the .class file,
98 	 * an empty array if none.
99 	 *
100 	 * @return the array of opens infos of the .class file, an empty array if none
101 	 */
getOpensInfo()102 	IPackageVisibilityInfo[] getOpensInfo();
103 
104 	/**
105 	 * Answer back the uses count.
106 	 *
107 	 * @return the uses counts
108 	 */
getUsesCount()109 	int getUsesCount();
110 
111 	/**
112 	 * Answer back the array of uses indices of the .class file,
113 	 * an empty array if none.
114 	 *
115 	 * @return the array of uses indices of the .class file, an empty array if none
116 	 */
getUsesIndices()117 	int[] getUsesIndices();
118 
119 	/**
120 	 * Answer back the array of uses class names of the .class file,
121 	 * an empty array if none.
122 	 *
123 	 * @return the array of uses class names of the .class file, an empty array if none
124 	 */
getUsesClassNames()125 	char[][] getUsesClassNames();
126 
127 	/**
128 	 * Answer back the provides count.
129 	 *
130 	 * @return the provides counts
131 	 */
getProvidesCount()132 	int getProvidesCount();
133 
134 	/**
135 	 * Answer back the array of provides infos of the .class file,
136 	 * an empty array if none.
137 	 *
138 	 * @return the array of provides infos of the .class file, an empty array if none
139 	 */
getProvidesInfo()140 	IProvidesInfo[] getProvidesInfo();
141 }
142