@NotNull
@Override
public Map<String, ErlangCallbackSpec> getCallbackMap() {
//TODO do we use stubs?
ErlangFileStub stub = getStub();
if (stub != null) {
Map<String, ErlangCallbackSpec> callbacksMap = new LinkedHashMap<String, ErlangCallbackSpec>();
for (StubElement child : stub.getChildrenStubs()) {
if (child instanceof ErlangCallbackSpecStub) {
String name = ((ErlangCallbackSpecStub) child).getName();
int arity = ((ErlangCallbackSpecStub) child).getArity();
callbacksMap.put(name + "/" + arity, ((ErlangCallbackSpecStub) child).getPsi());
}