use of com.sun.tools.javac.code.Symbol.VarSymbol in project ceylon-compiler by ceylon.
the class SerializedForm method computeDefaultSerializableFields.
/*
* Compute default Serializable fields from all members of ClassSymbol.
*
* Since the fields of ClassDocImpl might not contain private or
* package accessible fields, must walk over all members of ClassSymbol.
*/
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);
}
}
}
}
use of com.sun.tools.javac.code.Symbol.VarSymbol in project ceylon-compiler by ceylon.
the class JavacClass method getDirectFields.
@Override
public List<FieldMirror> getDirectFields() {
if (fields == null) {
List<FieldMirror> ret = new LinkedList<FieldMirror>();
for (Symbol sym : classSymbol.getEnclosedElements()) {
if (sym instanceof VarSymbol && (sym.flags() & Flags.PRIVATE) == 0) {
ret.add(new JavacField((VarSymbol) sym));
}
}
fields = Collections.unmodifiableList(ret);
}
return fields;
}
use of com.sun.tools.javac.code.Symbol.VarSymbol in project ceylon-compiler by ceylon.
the class JavacMethod method getParameters.
@Override
public List<VariableMirror> getParameters() {
if (parameters == null) {
com.sun.tools.javac.util.List<VarSymbol> params = methodSymbol.getParameters();
List<VariableMirror> ret = new ArrayList<VariableMirror>(params.size());
for (VarSymbol parameter : params) ret.add(new JavacVariable(parameter));
parameters = Collections.unmodifiableList(ret);
}
return parameters;
}
Aggregations