1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-21 22:02:06 +01:00

[core] Add StanzaBuilder.build()

This commit is contained in:
Florian Schmaus 2020-11-08 22:13:49 +01:00
parent 7e311ab9df
commit 72acd8e095
4 changed files with 11 additions and 2 deletions

View file

@ -43,6 +43,7 @@ public abstract class IqBuilder<IB extends IqBuilder<IB, I>, I extends IQ>
return getThis();
}
@Override
public abstract I build();
}

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2019 Florian Schmaus
* Copyright 2019-2020 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -41,4 +41,9 @@ public final class IqData extends AbstractIqBuilder<IqData> {
public IqData getThis() {
return this;
}
@Override
public Stanza build() {
throw new UnsupportedOperationException();
}
}

View file

@ -37,6 +37,7 @@ public abstract class MessageOrPresenceBuilder<MP extends MessageOrPresence<? ex
super(stanzaId);
}
@Override
public abstract MP build();
}

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2019 Florian Schmaus
* Copyright 2019-2020 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -184,6 +184,8 @@ public abstract class StanzaBuilder<B extends StanzaBuilder<B>> implements Stanz
return getThis();
}
public abstract Stanza build();
public abstract B getThis();
@Override