use of com.perl5.lang.perl.psi.stubs.subsdefinitions.PerlSubDefinitionStub in project Perl5-IDEA by Camelcade.
the class PerlSubDefinitionBase method getSubArgumentsList.
@NotNull
@Override
public List<PerlSubArgument> getSubArgumentsList() {
PerlSubDefinitionStub stub = getStub();
if (stub != null) {
return new ArrayList<>(stub.getSubArgumentsList());
}
List<PerlSubArgument> arguments = getPerlSubArgumentsFromSignature();
if (arguments == null) {
arguments = getPerlSubArgumentsFromBody();
}
return arguments;
}
use of com.perl5.lang.perl.psi.stubs.subsdefinitions.PerlSubDefinitionStub in project Perl5-IDEA by Camelcade.
the class PerlSubDefinitionElementType method deserialize.
@NotNull
@Override
public PerlSubDefinitionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
// noinspection ConstantConditions
String packageName = dataStream.readName().getString();
// noinspection ConstantConditions
String functionName = dataStream.readName().getString();
List<PerlSubArgument> arguments = PerlSubArgument.deserializeList(dataStream);
PerlSubAnnotations annotations = null;
if (dataStream.readBoolean()) {
annotations = PerlSubAnnotations.deserialize(dataStream);
}
return createStubElement(parentStub, packageName, functionName, arguments, annotations);
}
use of com.perl5.lang.perl.psi.stubs.subsdefinitions.PerlSubDefinitionStub in project Perl5-IDEA by Camelcade.
the class PerlSubDefinitionElementType method serialize.
@Override
public void serialize(@NotNull PerlSubDefinitionStub stub, @NotNull StubOutputStream dataStream) throws IOException {
dataStream.writeName(stub.getPackageName());
dataStream.writeName(stub.getSubName());
PerlSubArgument.serializeList(dataStream, stub.getSubArgumentsList());
PerlSubAnnotations subAnnotations = stub.getAnnotations();
if (subAnnotations == null) {
dataStream.writeBoolean(false);
} else {
dataStream.writeBoolean(true);
subAnnotations.serialize(dataStream);
}
}
Aggregations