forked from jooby-project/jooby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMvcFactory.java
More file actions
33 lines (30 loc) · 825 Bytes
/
MvcFactory.java
File metadata and controls
33 lines (30 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Jooby https://jooby.io
* Apache License Version 2.0 https://jooby.io/LICENSE.txt
* Copyright 2014 Edgar Espina
*/
package io.jooby;
import javax.annotation.Nonnull;
import javax.inject.Provider;
/**
* Created by a Jooby annotation processor tool using the {@link java.util.ServiceLoader} API.
*
* @since 2.1.0
*/
public interface MvcFactory {
/**
* Check if the factory applies for the given MVC route.
*
* @param type MVC route.
* @return True for matching factory.
*/
boolean supports(@Nonnull Class type);
/**
* Creates an extension module. The extension module are created at compilation time by Jooby
* APT.
*
* @param provider MVC route instance provider.
* @return All mvc route as extension module.
*/
@Nonnull Extension create(@Nonnull Provider provider);
}