當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。