當前位置: 首頁>>代碼示例>>Java>>正文


Java StringUtil.valueOf方法代碼示例

本文整理匯總了Java中org.teiid.core.util.StringUtil.valueOf方法的典型用法代碼示例。如果您正苦於以下問題:Java StringUtil.valueOf方法的具體用法?Java StringUtil.valueOf怎麽用?Java StringUtil.valueOf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.teiid.core.util.StringUtil的用法示例。


在下文中一共展示了StringUtil.valueOf方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: TransformationMetadata

import org.teiid.core.util.StringUtil; //導入方法依賴的package包/類
/**
 * TransformationMetadata constructor
 * @param context Object containing the info needed to lookup metadta.
 */
public TransformationMetadata(VDBMetaData vdbMetadata, final CompositeMetadataStore store, Map<String, VDBResources.Resource> vdbEntries, FunctionTree systemFunctions, Collection<FunctionTree> functionTrees) {
	ArgCheck.isNotNull(store);
	this.vdbMetaData = vdbMetadata;
	if (this.vdbMetaData !=null) {
		this.scriptEngineManager = vdbMetadata.getAttachment(ScriptEngineManager.class);
		this.importedModels = this.vdbMetaData.getImportedModels();
		this.allowedLanguages = StringUtil.valueOf(vdbMetadata.getPropertyValue(ALLOWED_LANGUAGES), Set.class); 
		if (this.allowedLanguages == null) {
			this.allowedLanguages = Collections.emptySet();
		}
		for (DataPolicyMetadata policy : vdbMetadata.getDataPolicyMap().values()) {
			policy = policy.clone();
			policies.put(policy.getName(), policy);
		}
		store.processGrants(policies);
	} else {
		this.importedModels = Collections.emptySet();
	}
    this.store = store;
    if (vdbEntries == null) {
    	this.vdbEntries = Collections.emptyMap();
    } else {
    	this.vdbEntries = vdbEntries;
    }
    if (functionTrees == null) {
    	this.functionLibrary = new FunctionLibrary(systemFunctions);
    } else {
        this.functionLibrary = new FunctionLibrary(systemFunctions, functionTrees.toArray(new FunctionTree[functionTrees.size()]));
    }
}
 
開發者ID:kenweezy,項目名稱:teiid,代碼行數:35,代碼來源:TransformationMetadata.java

示例2: convert

import org.teiid.core.util.StringUtil; //導入方法依賴的package包/類
private static Object convert(Object value, Class<?> type) {
	if(value.getClass() == type) {
		return value;
	}
	
	if (value instanceof String) {
		String str = (String)value;
		return StringUtil.valueOf(str, type);
	}
	return value;
}
 
開發者ID:kenweezy,項目名稱:teiid,代碼行數:12,代碼來源:TranslatorUtil.java

示例3: createConnectionFactory

import org.teiid.core.util.StringUtil; //導入方法依賴的package包/類
@Override
@SuppressWarnings("serial")
public BasicConnectionFactory<FileConnectionImpl> createConnectionFactory() throws ResourceException {
	if (this.parentDirectory == null) {
		throw new InvalidPropertyException(UTIL.getString("parentdirectory_not_set")); //$NON-NLS-1$
	}
	final Map<String, String> map = StringUtil.valueOf(this.fileMapping, Map.class);
	return new BasicConnectionFactory<FileConnectionImpl>() {
		
		@Override
		public FileConnectionImpl getConnection() throws ResourceException {
			return new FileConnectionImpl(parentDirectory, map, allowParentPaths);
		}
	};
}
 
開發者ID:kenweezy,項目名稱:teiid,代碼行數:16,代碼來源:FileManagedConnectionFactory.java


注:本文中的org.teiid.core.util.StringUtil.valueOf方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。