201 * that declares the executable represented by this object.
202 */
203 public abstract Class<?> getDeclaringClass();
204
205 /**
206 * Returns the name of the executable represented by this object.
207 */
208 public abstract String getName();
209
210 /**
211 * {@return the Java language {@linkplain Modifier modifiers} for
212 * the executable represented by this object}
213 * @see #accessFlags
214 */
215 public abstract int getModifiers();
216
217 /**
218 * {@return an unmodifiable set of the {@linkplain AccessFlag
219 * access flags} for the executable represented by this object,
220 * possibly empty}
221 *
222 * @see #getModifiers()
223 * @jvms 4.6 Methods
224 * @since 20
225 */
226 @Override
227 public Set<AccessFlag> accessFlags() {
228 return reflectionFactory.parseAccessFlags(getModifiers(),
229 AccessFlag.Location.METHOD,
230 getDeclaringClass());
231 }
232
233 /**
234 * Returns an array of {@code TypeVariable} objects that represent the
235 * type variables declared by the generic declaration represented by this
236 * {@code GenericDeclaration} object, in declaration order. Returns an
237 * array of length 0 if the underlying generic declaration declares no type
238 * variables.
239 *
240 * @return an array of {@code TypeVariable} objects that represent
|
201 * that declares the executable represented by this object.
202 */
203 public abstract Class<?> getDeclaringClass();
204
205 /**
206 * Returns the name of the executable represented by this object.
207 */
208 public abstract String getName();
209
210 /**
211 * {@return the Java language {@linkplain Modifier modifiers} for
212 * the executable represented by this object}
213 * @see #accessFlags
214 */
215 public abstract int getModifiers();
216
217 /**
218 * {@return an unmodifiable set of the {@linkplain AccessFlag
219 * access flags} for the executable represented by this object,
220 * possibly empty}
221 * The {@code AccessFlags} may depend on the class file format version of the class.
222 *
223 * @see #getModifiers()
224 * @jvms 4.6 Methods
225 * @since 20
226 */
227 @Override
228 public Set<AccessFlag> accessFlags() {
229 return reflectionFactory.parseAccessFlags(getModifiers(),
230 AccessFlag.Location.METHOD,
231 getDeclaringClass());
232 }
233
234 /**
235 * Returns an array of {@code TypeVariable} objects that represent the
236 * type variables declared by the generic declaration represented by this
237 * {@code GenericDeclaration} object, in declaration order. Returns an
238 * array of length 0 if the underlying generic declaration declares no type
239 * variables.
240 *
241 * @return an array of {@code TypeVariable} objects that represent
|