本文整理汇总了Java中org.glassfish.jersey.server.model.Parameter.getRawType方法的典型用法代码示例。如果您正苦于以下问题:Java Parameter.getRawType方法的具体用法?Java Parameter.getRawType怎么用?Java Parameter.getRawType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.glassfish.jersey.server.model.Parameter
的用法示例。
在下文中一共展示了Parameter.getRawType方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createValueFactory
import org.glassfish.jersey.server.model.Parameter; //导入方法依赖的package包/类
@Override protected Factory<?> createValueFactory(final Parameter parameter) {
final Class<?> classType = parameter.getRawType();
final Auth auth = parameter.getAnnotation(Auth.class);
if (auth == null) {
return null;
}
if (classType.equals(Client.class)) {
return new AbstractContainerRequestValueFactory<Client>() {
@Override public Client provide() {
return clientAuthFactory.provide(getContainerRequest());
}
};
}
if (classType.equals(AutomationClient.class)) {
return new AbstractContainerRequestValueFactory<AutomationClient>() {
@Override public AutomationClient provide() {
return automationClientAuthFactory.provide(getContainerRequest());
}
};
}
if (classType.equals(User.class)) {
return new AbstractContainerRequestValueFactory<User>() {
@Override public User provide() {
return userAuthFactory.provide(getContainerRequest());
}
};
}
return null;
}
示例2: createValueFactory
import org.glassfish.jersey.server.model.Parameter; //导入方法依赖的package包/类
@Override
protected Factory<?> createValueFactory(Parameter parameter) {
Class<?> classType = parameter.getRawType();
if (classType == null || (!classType.equals(Configuration.class))) {
return null;
}
return new ConfigurationFactory(configuration, dataSource, multiTenantConnectionProvider,
parameter.getAnnotation(JooqConfiguration.class));
}
示例3: createValueFactory
import org.glassfish.jersey.server.model.Parameter; //导入方法依赖的package包/类
@Override
protected Factory<?> createValueFactory(Parameter parameter)
{
Class<?> classType = parameter.getRawType();
if (classType == null || (!classType.equals(UnverifiedCredentials.class)))
{
return null;
}
return new MyContextValueFactory();
}
示例4: createValueFactory
import org.glassfish.jersey.server.model.Parameter; //导入方法依赖的package包/类
@Override
protected Factory<?> createValueFactory(Parameter parameter) {
Class<?> paramType = parameter.getRawType();
SearchParam annotation = parameter.getAnnotation(SearchParam.class);
if (annotation != null && paramType.isAssignableFrom(SearchModel.class)) {
return new SearchFactory();
}
return null;
}
示例5: createValueFactory
import org.glassfish.jersey.server.model.Parameter; //导入方法依赖的package包/类
@Override
protected Factory<?> createValueFactory(Parameter parameter) {
Class<?> paramType = parameter.getRawType();
RobeAuth annotation = parameter.getAnnotation(RobeAuth.class);
if (annotation != null && paramType.isAssignableFrom(BasicToken.class)) {
return new TokenFactory<>(annotation.required());
}
return null;
}
示例6: getValueFactory
import org.glassfish.jersey.server.model.Parameter; //导入方法依赖的package包/类
@Override
public Factory<?> getValueFactory(Parameter parameter) {
final Class<?> classType = parameter.getRawType();
final JooqInject jooqInjectParam = parameter.getAnnotation(JooqInject.class);
return (classType == null || !classType.equals(DSLContext.class) || jooqInjectParam == null)
? null // return null when parameter not supported
: new DSLContextFactory(getConfiguration(configurationMap, jooqInjectParam.value())
);
}
示例7: createValueFactory
import org.glassfish.jersey.server.model.Parameter; //导入方法依赖的package包/类
@Override
protected Factory<?> createValueFactory(Parameter parameter) {
Class<?> paramType = parameter.getRawType();
Auth annotation = parameter.getAnnotation(Auth.class);
if (annotation != null && paramType.isAssignableFrom(SingularityUser.class)) {
return authFactory;
}
return null;
}
示例8: addNullParam
import org.glassfish.jersey.server.model.Parameter; //导入方法依赖的package包/类
/**
* Initializes and adds null parameter to {@link List} of parameters
*
* @param parameter
*/
private void addNullParam(Parameter parameter) {
Class<?> paramType = parameter.getRawType();
Object nullParam;
if (paramType.isPrimitive()) {
nullParam = ClassUtils.getDefault(paramType);
} else {
nullParam = null;
}
paramsList.add(nullParam);
}
示例9: createValueFactory
import org.glassfish.jersey.server.model.Parameter; //导入方法依赖的package包/类
@Override
protected Factory<?> createValueFactory(final Parameter parameter) {
final Class<?> classType = parameter.getRawType();
Context context = parameter.getAnnotation(Context.class);
if (context == null)
return null;
if (classType.isAssignableFrom(SessionHelper.class)) {
return new SessionHelperFactory();
} else {
return null;
}
}
示例10: createValueFactory
import org.glassfish.jersey.server.model.Parameter; //导入方法依赖的package包/类
@Override
protected Factory<?> createValueFactory(final Parameter parameter) {
final Class<?> classType = parameter.getRawType();
SecurityCheck securityCheck = parameter.getAnnotation(SecurityCheck.class);
if (securityCheck == null)
return null;
if (classType.isAssignableFrom(User.class)) {
return new SecurityCheckFactory(securityCheck.value(), securityCheck.apiKeyAllowed());
} else {
return null;
}
}