Java Code Examples for com.sun.tools.javac.code.Flags#STRICTFP
The following examples show how to use
com.sun.tools.javac.code.Flags#STRICTFP .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TreeFactory.java From netbeans with Apache License 2.0 | 6 votes |
public static long modifiersToFlags(Set<Modifier> flagset) { long flags = 0L; for (Modifier mod : flagset) switch (mod) { case PUBLIC: flags |= Flags.PUBLIC; break; case PROTECTED: flags |= Flags.PROTECTED; break; case PRIVATE: flags |= Flags.PRIVATE; break; case ABSTRACT: flags |= Flags.ABSTRACT; break; case STATIC: flags |= Flags.STATIC; break; case FINAL: flags |= Flags.FINAL; break; case TRANSIENT: flags |= Flags.TRANSIENT; break; case VOLATILE: flags |= Flags.VOLATILE; break; case SYNCHRONIZED: flags |= Flags.SYNCHRONIZED; break; case NATIVE: flags |= Flags.NATIVE; break; case STRICTFP: flags |= Flags.STRICTFP; break; case DEFAULT: flags |= Flags.DEFAULT; break; default: throw new AssertionError("Unknown Modifier: " + mod); //NOI18N } return flags; }
Example 2
Source File: TreeMaker.java From netbeans with Apache License 2.0 | 6 votes |
public ModifiersTree addModifiersModifier(ModifiersTree modifiers, Modifier modifier) { long c = ((JCModifiers) modifiers).flags & ~Flags.GENERATEDCONSTR; switch (modifier) { case ABSTRACT: c = c | Flags.ABSTRACT; break; case FINAL: c = c | Flags.FINAL; break; case NATIVE: c = c | Flags.NATIVE; break; case PRIVATE: c = c | Flags.PRIVATE; break; case PROTECTED: c = c | Flags.PROTECTED; break; case PUBLIC: c = c | Flags.PUBLIC; break; case STATIC: c = c | Flags.STATIC; break; case STRICTFP: c = c | Flags.STRICTFP; break; case SYNCHRONIZED: c = c | Flags.SYNCHRONIZED; break; case TRANSIENT: c = c | Flags.TRANSIENT; break; case VOLATILE: c = c | Flags.VOLATILE; break; case DEFAULT: c = c | Flags.DEFAULT; break; default: break; } return Modifiers(c, modifiers.getAnnotations()); }
Example 3
Source File: TreeMaker.java From netbeans with Apache License 2.0 | 6 votes |
public ModifiersTree removeModifiersModifier(ModifiersTree modifiers, Modifier modifier) { long c = ((JCModifiers) modifiers).flags & ~Flags.GENERATEDCONSTR; switch (modifier) { case ABSTRACT: c = c & ~Flags.ABSTRACT; break; case FINAL: c = c & ~Flags.FINAL; break; case NATIVE: c = c & ~Flags.NATIVE; break; case PRIVATE: c = c & ~Flags.PRIVATE; break; case PROTECTED: c = c & ~Flags.PROTECTED; break; case PUBLIC: c = c & ~Flags.PUBLIC; break; case STATIC: c = c & ~Flags.STATIC; break; case STRICTFP: c = c & ~Flags.STRICTFP; break; case SYNCHRONIZED: c = c & ~Flags.SYNCHRONIZED; break; case TRANSIENT: c = c & ~Flags.TRANSIENT; break; case VOLATILE: c = c & ~Flags.VOLATILE; break; case DEFAULT: c = c & ~Flags.DEFAULT; break; default: break; } return Modifiers(c, modifiers.getAnnotations()); }
Example 4
Source File: PackageGenerator.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
long getFlagByName(String modifierName) { switch (modifierName) { case "public": return Flags.PUBLIC; case "private": return Flags.PRIVATE; case "protected": return Flags.PROTECTED; case "static": return Flags.STATIC; case "final": return Flags.FINAL; case "abstract": return Flags.ABSTRACT; case "strictfp": return Flags.STRICTFP; default: return 0; } }
Example 5
Source File: SrcAnnotated.java From manifold with Apache License 2.0 | 4 votes |
public static long modifiersFrom( Set<javax.lang.model.element.Modifier> modifiers ) { long mods = 0; for( javax.lang.model.element.Modifier mod : modifiers ) { switch( mod ) { case PUBLIC: mods |= Modifier.PUBLIC; break; case PROTECTED: mods |= Modifier.PROTECTED; break; case PRIVATE: mods |= Modifier.PRIVATE; break; case ABSTRACT: mods |= Modifier.ABSTRACT; break; case DEFAULT: mods |= Flags.DEFAULT; break; case STATIC: mods |= Modifier.STATIC; break; case FINAL: mods |= Modifier.FINAL; break; case TRANSIENT: mods |= Modifier.TRANSIENT; break; case VOLATILE: mods |= Modifier.VOLATILE; break; case SYNCHRONIZED: mods |= Modifier.SYNCHRONIZED; break; case NATIVE: mods |= Modifier.NATIVE; break; case STRICTFP: mods |= Flags.STRICTFP; break; } } return mods; }