[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(); return getThis();
} }
@Override
public abstract I build(); 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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() { public IqData getThis() {
return this; 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); super(stanzaId);
} }
@Override
public abstract MP build(); 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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(); return getThis();
} }
public abstract Stanza build();
public abstract B getThis(); public abstract B getThis();
@Override @Override