-
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.
Merge pull request #9 from TareqK/develop
Added Proper Inheritance to memory bus impl
- Loading branch information
Showing
10 changed files
with
162 additions
and
14 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
28 changes: 28 additions & 0 deletions
28
easybus-core/src/test/java/me/kisoft/easybus/test/events/ChildClassEvent.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,28 @@ | ||
/* | ||
* Copyright 2021 tareq. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package me.kisoft.easybus.test.events; | ||
|
||
import me.kisoft.easybus.Event; | ||
|
||
/** | ||
* | ||
* @author tareq | ||
*/ | ||
@Event | ||
public class ChildClassEvent extends ParentClassEvent{ | ||
public static boolean checked = false; | ||
public static boolean checkedSpecific = false; | ||
} |
32 changes: 32 additions & 0 deletions
32
easybus-core/src/test/java/me/kisoft/easybus/test/events/ParentClassEvent.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,32 @@ | ||
/* | ||
* Copyright 2021 tareq. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package me.kisoft.easybus.test.events; | ||
|
||
import me.kisoft.easybus.Event; | ||
|
||
/** | ||
* | ||
* @author tareq | ||
*/ | ||
@Event | ||
public class ParentClassEvent { | ||
|
||
public static boolean checked = false; | ||
|
||
public static void doChildCheck() { | ||
ChildClassEvent.checked = true; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
easybus-core/src/test/java/me/kisoft/easybus/test/handlers/ChildClassHandler.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,31 @@ | ||
/* | ||
* Copyright 2021 tareq. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package me.kisoft.easybus.test.handlers; | ||
|
||
import me.kisoft.easybus.Handle; | ||
import me.kisoft.easybus.test.events.ChildClassEvent; | ||
|
||
/** | ||
* | ||
* @author tareq | ||
*/ | ||
@Handle(event = ChildClassEvent.class, async = false) | ||
public class ChildClassHandler { | ||
|
||
public void handle(ChildClassEvent event) { | ||
ChildClassEvent.checkedSpecific = true; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
easybus-core/src/test/java/me/kisoft/easybus/test/handlers/ParentClassHandler.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,32 @@ | ||
/* | ||
* Copyright 2021 tareq. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package me.kisoft.easybus.test.handlers; | ||
|
||
import me.kisoft.easybus.Handle; | ||
import me.kisoft.easybus.test.events.ParentClassEvent; | ||
|
||
/** | ||
* | ||
* @author tareq | ||
*/ | ||
@Handle(event = ParentClassEvent.class, async = false) | ||
public class ParentClassHandler { | ||
|
||
public void handle(ParentClassEvent event) { | ||
ParentClassEvent.checked = true; | ||
ParentClassEvent.doChildCheck(); | ||
} | ||
} |
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