Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial support for context-modifying modules
- Loading branch information
1 parent
e015945
commit 7d03d79
Showing
8 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
core/src/main/java/com/webcohesion/enunciate/module/BasicProviderModule.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,25 @@ | ||
package com.webcohesion.enunciate.module; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
/** | ||
* @author Ryan Heaton | ||
*/ | ||
public abstract class BasicProviderModule extends BasicEnunicateModule implements ApiRegistryProviderModule { | ||
|
||
@Override | ||
public List<DependencySpec> getDependencySpecifications() { | ||
return Collections.<DependencySpec>singletonList(new DependencySpec() { | ||
@Override | ||
public boolean accept(EnunciateModule module) { | ||
return module instanceof ContextModifyingModule; | ||
} | ||
|
||
@Override | ||
public boolean isFulfilled() { | ||
return true; | ||
} | ||
}); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
core/src/main/java/com/webcohesion/enunciate/module/ContextModifyingModule.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,9 @@ | ||
package com.webcohesion.enunciate.module; | ||
|
||
/** | ||
* Marker interface for designating a module as one that modifies the Enunciate context. | ||
* | ||
* @author Ryan Heaton | ||
*/ | ||
public interface ContextModifyingModule extends EnunciateModule { | ||
} |
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
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