Search in sources :

Example 1 with Beam

use of org.elixir_lang.beam.Beam in project intellij-elixir by KronicDeth.

the class BeamFileImpl method buildFileStub.

public static PsiFileStub<?> buildFileStub(byte[] bytes) {
    ElixirFileStubImpl stub = new ElixirFileStubImpl();
    Beam beam = null;
    try {
        beam = Beam.from(bytes);
    } catch (IOException e) {
        LOGGER.error(e);
    } catch (OtpErlangDecodeException e) {
        LOGGER.error(e);
    }
    ModuleStub moduleStub = buildModuleStub(stub, beam);
    if (moduleStub == null) {
        stub = null;
    }
    return stub;
}
Also used : ElixirFileStubImpl(org.elixir_lang.psi.stub.impl.ElixirFileStubImpl) Beam(org.elixir_lang.beam.Beam) OtpErlangDecodeException(com.ericsson.otp.erlang.OtpErlangDecodeException) ModuleStub(org.elixir_lang.beam.psi.stubs.ModuleStub) IOException(java.io.IOException)

Aggregations

OtpErlangDecodeException (com.ericsson.otp.erlang.OtpErlangDecodeException)1 IOException (java.io.IOException)1 Beam (org.elixir_lang.beam.Beam)1 ModuleStub (org.elixir_lang.beam.psi.stubs.ModuleStub)1 ElixirFileStubImpl (org.elixir_lang.psi.stub.impl.ElixirFileStubImpl)1