MCPcopy Create free account
hub / github.com/beanshell/beanshell / getASMModifiers

Method getASMModifiers

src/bsh/ClassGeneratorUtil.java:277–300  ·  view source on GitHub ↗

Translate bsh.Modifiers into ASM modifier bitflags.

(Modifiers modifiers)

Source from the content-addressed store, hash-verified

275 * Translate bsh.Modifiers into ASM modifier bitflags.
276 */
277 private static int getASMModifiers(Modifiers modifiers) {
278 int mods = 0;
279 if (modifiers == null) {
280 return mods;
281 }
282
283 if (modifiers.hasModifier("public")) {
284 mods += ACC_PUBLIC;
285 }
286 if (modifiers.hasModifier("protected")) {
287 mods += ACC_PROTECTED;
288 }
289 if (modifiers.hasModifier("static")) {
290 mods += ACC_STATIC;
291 }
292 if (modifiers.hasModifier("synchronized")) {
293 mods += ACC_SYNCHRONIZED;
294 }
295 if (modifiers.hasModifier("abstract")) {
296 mods += ACC_ABSTRACT;
297 }
298
299 return mods;
300 }
301
302
303 /**

Callers 1

generateClassMethod · 0.95

Calls 1

hasModifierMethod · 0.45

Tested by

no test coverage detected