当前位置: 首页>>代码示例>>Java>>正文


Java LazyInitProxyFactory类代码示例

本文整理汇总了Java中org.apache.wicket.proxy.LazyInitProxyFactory的典型用法代码示例。如果您正苦于以下问题:Java LazyInitProxyFactory类的具体用法?Java LazyInitProxyFactory怎么用?Java LazyInitProxyFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LazyInitProxyFactory类属于org.apache.wicket.proxy包,在下文中一共展示了LazyInitProxyFactory类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getFieldValue

import org.apache.wicket.proxy.LazyInitProxyFactory; //导入依赖的package包/类
@Override
public Object getFieldValue(final Field field, Object fieldOwner) {

  String key = field.getType().getName();

  if (!this.context.containsKey(key)) {
    String message = formatMissingObjectErrorMessage(field, fieldOwner);
    throw new IllegalStateException(message);
  }

  final Object bean = this.context.get(key);

  return LazyInitProxyFactory.createProxy(field.getType(), new IProxyTargetLocator() {

    private static final long serialVersionUID = 1L;

    @Override
    public Object locateProxyTarget() {
      return bean;
    }
  });
}
 
开发者ID:olle,项目名称:wickject,代码行数:23,代码来源:Wickject.java

示例2: getFieldValue

import org.apache.wicket.proxy.LazyInitProxyFactory; //导入依赖的package包/类
@Override
public Object getFieldValue(Field field, Object fieldOwner) {
    if (supportsField(field)) {
        IProxyTargetLocator locator = new ArtifactoryBeanLocator(field.getType(), contextLocator);
        Object proxy = LazyInitProxyFactory.createProxy(field.getType(), locator);
        return proxy;
    } else {
        return null;
    }
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:11,代码来源:ArtifactoryContextAnnotFieldValueFactory.java

示例3: ArtifactoryWebSession

import org.apache.wicket.proxy.LazyInitProxyFactory; //导入依赖的package包/类
public ArtifactoryWebSession(Request request) {
    super(request);
    authenticationManager = (AuthenticationManager) LazyInitProxyFactory.createProxy(
            AuthenticationManager.class, new SecurityServiceLocator());
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:6,代码来源:ArtifactoryWebSession.java

示例4: getProxyDao

import org.apache.wicket.proxy.LazyInitProxyFactory; //导入依赖的package包/类
/**
 * Creates a proxy via LazyInitProxyFactory. Use-full if needed in Wicket components. Avoids Wicket serialization of the dao.
 * @return
 */
public BaseDao< ? > getProxyDao()
{
  return (BaseDao< ? >) LazyInitProxyFactory.createProxy(registryEntry.getDaoClassType(), new DaoLocator(registryEntry.getId()));
}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:9,代码来源:WebRegistryEntry.java


注:本文中的org.apache.wicket.proxy.LazyInitProxyFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。