-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
345 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
.../toolisticon/fluapigen/integrationtest/IntegrationTest_Inheritance_reusingInterfaces.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package io.toolisticon.fluapigen.integrationtest; | ||
|
||
import io.toolisticon.fluapigen.api.FluentApi; | ||
import io.toolisticon.fluapigen.api.FluentApiBackingBean; | ||
import io.toolisticon.fluapigen.api.FluentApiBackingBeanField; | ||
import io.toolisticon.fluapigen.api.FluentApiBackingBeanMapping; | ||
import io.toolisticon.fluapigen.api.FluentApiCommand; | ||
import io.toolisticon.fluapigen.api.FluentApiInterface; | ||
import io.toolisticon.fluapigen.api.FluentApiParentBackingBeanMapping; | ||
import io.toolisticon.fluapigen.api.FluentApiRoot; | ||
|
||
import java.io.Serializable; | ||
|
||
@FluentApi("InheritanceIntegrationTestStarter") | ||
public class IntegrationTest_Inheritance_reusingInterfaces { | ||
|
||
// Backing Bean Interface | ||
@FluentApiBackingBean | ||
interface MyRootLevelBackingBean { | ||
|
||
@FluentApiBackingBeanField("1st") | ||
FirstInheritedBackingBean get1st(); | ||
|
||
@FluentApiBackingBeanField("2nd") | ||
SecondInheritedBackingBean get2nd(); | ||
|
||
} | ||
|
||
|
||
interface MyReusedBackingBeanFields { | ||
|
||
@FluentApiBackingBeanField("name") | ||
String getName(); | ||
|
||
} | ||
|
||
|
||
@FluentApiBackingBean | ||
interface FirstInheritedBackingBean extends MyReusedBackingBeanFields { | ||
|
||
@FluentApiBackingBeanField("1st") | ||
String get1st(); | ||
|
||
} | ||
|
||
@FluentApiBackingBean | ||
interface SecondInheritedBackingBean extends MyReusedBackingBeanFields { | ||
|
||
@FluentApiBackingBeanField("2nd") | ||
String get2nd(); | ||
|
||
} | ||
|
||
|
||
// Fluent Api interfaces | ||
@FluentApiInterface(MyRootLevelBackingBean.class) | ||
@FluentApiRoot | ||
public interface MyRootInterface { | ||
|
||
My1stInterface goto1st(); | ||
|
||
My2ndInterface goto2nd(); | ||
|
||
@FluentApiCommand(MyCommand.class) | ||
MyRootLevelBackingBean myCommand(); | ||
|
||
|
||
} | ||
|
||
|
||
public interface SharedInterface<FLUENT_INTERFACE> { | ||
|
||
FLUENT_INTERFACE setName(@FluentApiBackingBeanMapping(value = "name") String name); | ||
|
||
} | ||
|
||
|
||
@FluentApiInterface(FirstInheritedBackingBean.class) | ||
public interface My1stInterface extends SharedInterface<My1stInterface> { | ||
|
||
@FluentApiParentBackingBeanMapping("1st") | ||
MyRootInterface set1st(@FluentApiBackingBeanMapping(value = "1st") String first); | ||
|
||
} | ||
|
||
@FluentApiInterface(SecondInheritedBackingBean.class) | ||
public interface My2ndInterface extends SharedInterface<My2ndInterface> { | ||
|
||
@FluentApiParentBackingBeanMapping("2nd") | ||
MyRootInterface set1st(@FluentApiBackingBeanMapping(value = "2nd") String second); | ||
|
||
} | ||
|
||
// Commands | ||
@FluentApiCommand | ||
static class MyCommand { | ||
static MyRootLevelBackingBean myCommand(MyRootLevelBackingBean backingBean) { | ||
System.out.println("CHECK"); | ||
return backingBean; | ||
} | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.