Search in sources :

Example 1 with FieldMirror

use of com.redhat.ceylon.model.loader.mirror.FieldMirror 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;
}
Also used : FieldMirror(com.redhat.ceylon.model.loader.mirror.FieldMirror) MethodSymbol(com.sun.tools.javac.code.Symbol.MethodSymbol) Symbol(com.sun.tools.javac.code.Symbol) ClassSymbol(com.sun.tools.javac.code.Symbol.ClassSymbol) VarSymbol(com.sun.tools.javac.code.Symbol.VarSymbol) VarSymbol(com.sun.tools.javac.code.Symbol.VarSymbol) LinkedList(java.util.LinkedList)

Aggregations

FieldMirror (com.redhat.ceylon.model.loader.mirror.FieldMirror)1 Symbol (com.sun.tools.javac.code.Symbol)1 ClassSymbol (com.sun.tools.javac.code.Symbol.ClassSymbol)1 MethodSymbol (com.sun.tools.javac.code.Symbol.MethodSymbol)1 VarSymbol (com.sun.tools.javac.code.Symbol.VarSymbol)1 LinkedList (java.util.LinkedList)1