use of org.elixir_lang.psi.call.MaybeExported in project intellij-elixir by KronicDeth.
the class ModuleImpl method exports.
@Contract(pure = true)
@NotNull
public static MaybeExported[] exports(@NotNull TreeElement mirror) {
PsiElement mirrorPsi = mirror.getPsi();
MaybeExported[] exports;
if (mirrorPsi instanceof Call) {
Call mirrorCall = (Call) mirrorPsi;
final List<MaybeExported> exportedList = new ArrayList<MaybeExported>();
Modular.callDefinitionClauseCallWhile(mirrorCall, new Function<Call, Boolean>() {
@Override
public Boolean fun(Call call) {
if (call instanceof MaybeExported) {
MaybeExported maybeExportedCall = (MaybeExported) call;
if (maybeExportedCall.isExported()) {
exportedList.add(maybeExportedCall);
}
}
return true;
}
});
exports = exportedList.toArray(new MaybeExported[exportedList.size()]);
} else {
exports = new MaybeExported[0];
}
return exports;
}
Aggregations