Package com.google.api.server.spi.tools
Class AnnotationApiConfigGenerator
- java.lang.Object
-
- com.google.api.server.spi.tools.AnnotationApiConfigGenerator
-
- All Implemented Interfaces:
ApiConfigGenerator
public class AnnotationApiConfigGenerator extends Object implements ApiConfigGenerator
Generates configuration files from annotations on endpoint classes.
-
-
Constructor Summary
Constructors Constructor Description AnnotationApiConfigGenerator()AnnotationApiConfigGenerator(com.google.api.server.spi.config.ApiConfigWriter apiConfigWriter, ClassLoader classLoader, com.google.api.server.spi.config.model.ApiConfig.Factory configFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>generateConfig(com.google.api.server.spi.ServiceContext serviceContext, Class<?>... serviceClasses)Generates API configuration file as a string for a set of service classes given a default API name.Map<String,String>generateConfig(Class<?>... serviceClasses)Generates API configuration file as a string for a set of service classes.
-
-
-
Constructor Detail
-
AnnotationApiConfigGenerator
public AnnotationApiConfigGenerator() throws ClassNotFoundException- Throws:
ClassNotFoundException
-
AnnotationApiConfigGenerator
public AnnotationApiConfigGenerator(com.google.api.server.spi.config.ApiConfigWriter apiConfigWriter, ClassLoader classLoader, com.google.api.server.spi.config.model.ApiConfig.Factory configFactory) throws ClassNotFoundException- Throws:
ClassNotFoundException
-
-
Method Detail
-
generateConfig
public Map<String,String> generateConfig(Class<?>... serviceClasses) throws com.google.api.server.spi.config.ApiConfigException
Description copied from interface:ApiConfigGeneratorGenerates API configuration file as a string for a set of service classes.- Specified by:
generateConfigin interfaceApiConfigGenerator- Parameters:
serviceClasses- Service classes to generate API configuration for.- Returns:
- A map of API configuration JSON strings with <apiString>.<ext> as the key.
- Throws:
com.google.api.server.spi.config.ApiConfigException
-
generateConfig
public Map<String,String> generateConfig(com.google.api.server.spi.ServiceContext serviceContext, Class<?>... serviceClasses) throws com.google.api.server.spi.config.ApiConfigException
Description copied from interface:ApiConfigGeneratorGenerates API configuration file as a string for a set of service classes given a default API name.- Specified by:
generateConfigin interfaceApiConfigGenerator- Parameters:
serviceContext- Service context used to retrieve information about the service.serviceClasses- Service classes to generate API configuration for.- Returns:
- A map of API configuration JSON strings with <apiString>.<ext> as the key.
- Throws:
com.google.api.server.spi.config.ApiConfigException
-
-