Java Code Examples for com.sun.tools.javac.code.Flags#TRANSIENT
The following examples show how to use
com.sun.tools.javac.code.Flags#TRANSIENT .
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: SerializedForm.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private void computeDefaultSerializableFields(DocEnv env, ClassSymbol def, ClassDocImpl cd) { for (Scope.Entry e = def.members().elems; e != null; e = e.sibling) { if (e.sym != null && e.sym.kind == Kinds.VAR) { VarSymbol f = (VarSymbol)e.sym; if ((f.flags() & Flags.STATIC) == 0 && (f.flags() & Flags.TRANSIENT) == 0) { //### No modifier filtering applied here. FieldDocImpl fd = env.getFieldDoc(f); //### Add to beginning. //### Preserve order used by old 'javadoc'. fields.prepend(fd); } } } }
Example 2
Source File: SerializedForm.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private void computeDefaultSerializableFields(DocEnv env, ClassSymbol def, ClassDocImpl cd) { for (Scope.Entry e = def.members().elems; e != null; e = e.sibling) { if (e.sym != null && e.sym.kind == Kinds.VAR) { VarSymbol f = (VarSymbol)e.sym; if ((f.flags() & Flags.STATIC) == 0 && (f.flags() & Flags.TRANSIENT) == 0) { //### No modifier filtering applied here. FieldDocImpl fd = env.getFieldDoc(f); //### Add to beginning. //### Preserve order used by old 'javadoc'. fields.prepend(fd); } } } }
Example 3
Source File: SerializedForm.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private void computeDefaultSerializableFields(DocEnv env, ClassSymbol def, ClassDocImpl cd) { for (Scope.Entry e = def.members().elems; e != null; e = e.sibling) { if (e.sym != null && e.sym.kind == Kinds.VAR) { VarSymbol f = (VarSymbol)e.sym; if ((f.flags() & Flags.STATIC) == 0 && (f.flags() & Flags.TRANSIENT) == 0) { //### No modifier filtering applied here. FieldDocImpl fd = env.getFieldDoc(f); //### Add to beginning. //### Preserve order used by old 'javadoc'. fields.prepend(fd); } } } }
Example 4
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 5
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 6
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 7
Source File: SerializedForm.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private void computeDefaultSerializableFields(DocEnv env, ClassSymbol def, ClassDocImpl cd) { for (Scope.Entry e = def.members().elems; e != null; e = e.sibling) { if (e.sym != null && e.sym.kind == Kinds.VAR) { VarSymbol f = (VarSymbol)e.sym; if ((f.flags() & Flags.STATIC) == 0 && (f.flags() & Flags.TRANSIENT) == 0) { //### No modifier filtering applied here. FieldDocImpl fd = env.getFieldDoc(f); //### Add to beginning. //### Preserve order used by old 'javadoc'. fields.prepend(fd); } } } }
Example 8
Source File: SerializedForm.java From hottub with GNU General Public License v2.0 | 6 votes |
private void computeDefaultSerializableFields(DocEnv env, ClassSymbol def, ClassDocImpl cd) { for (Scope.Entry e = def.members().elems; e != null; e = e.sibling) { if (e.sym != null && e.sym.kind == Kinds.VAR) { VarSymbol f = (VarSymbol)e.sym; if ((f.flags() & Flags.STATIC) == 0 && (f.flags() & Flags.TRANSIENT) == 0) { //### No modifier filtering applied here. FieldDocImpl fd = env.getFieldDoc(f); //### Add to beginning. //### Preserve order used by old 'javadoc'. fields.prepend(fd); } } } }
Example 9
Source File: SerializedForm.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private void computeDefaultSerializableFields(DocEnv env, ClassSymbol def, ClassDocImpl cd) { for (Scope.Entry e = def.members().elems; e != null; e = e.sibling) { if (e.sym != null && e.sym.kind == Kinds.VAR) { VarSymbol f = (VarSymbol)e.sym; if ((f.flags() & Flags.STATIC) == 0 && (f.flags() & Flags.TRANSIENT) == 0) { //### No modifier filtering applied here. FieldDocImpl fd = env.getFieldDoc(f); //### Add to beginning. //### Preserve order used by old 'javadoc'. fields.prepend(fd); } } } }
Example 10
Source File: SerializedForm.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private void computeDefaultSerializableFields(DocEnv env, ClassSymbol def, ClassDocImpl cd) { for (Scope.Entry e = def.members().elems; e != null; e = e.sibling) { if (e.sym != null && e.sym.kind == Kinds.VAR) { VarSymbol f = (VarSymbol)e.sym; if ((f.flags() & Flags.STATIC) == 0 && (f.flags() & Flags.TRANSIENT) == 0) { //### No modifier filtering applied here. FieldDocImpl fd = env.getFieldDoc(f); //### Add to beginning. //### Preserve order used by old 'javadoc'. fields.prepend(fd); } } } }
Example 11
Source File: JavacHandlerUtil.java From EasyMPermission with MIT License | 6 votes |
/** * Given a list of field names and a node referring to a type, finds each name in the list that does not match a field within the type. */ public static List<Integer> createListOfNonExistentFields(List<String> list, JavacNode type, boolean excludeStandard, boolean excludeTransient) { boolean[] matched = new boolean[list.size()]; for (JavacNode child : type.down()) { if (list.isEmpty()) break; if (child.getKind() != Kind.FIELD) continue; JCVariableDecl field = (JCVariableDecl)child.get(); if (excludeStandard) { if ((field.mods.flags & Flags.STATIC) != 0) continue; if (field.name.toString().startsWith("$")) continue; } if (excludeTransient && (field.mods.flags & Flags.TRANSIENT) != 0) continue; int idx = list.indexOf(child.getName()); if (idx > -1) matched[idx] = true; } ListBuffer<Integer> problematic = new ListBuffer<Integer>(); for (int i = 0 ; i < list.size() ; i++) { if (!matched[i]) problematic.append(i); } return problematic.toList(); }
Example 12
Source File: WorkArounds.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private void computeDefaultSerializableFields(ClassSymbol te) { for (Symbol sym : te.members().getSymbols(NON_RECURSIVE)) { if (sym != null && sym.kind == VAR) { VarSymbol f = (VarSymbol) sym; if ((f.flags() & Flags.STATIC) == 0 && (f.flags() & Flags.TRANSIENT) == 0) { //### No modifier filtering applied here. //### Add to beginning. //### Preserve order used by old 'javadoc'. fields.add(f); } } } }