本文整理了Java中org.milyn.container.ApplicationContext.getAttribute()
方法的一些代码示例,展示了ApplicationContext.getAttribute()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationContext.getAttribute()
方法的具体详情如下:
包路径:org.milyn.container.ApplicationContext
类名称:ApplicationContext
方法名:getAttribute
暂无
代码示例来源:origin: org.virtuslab/milyn-smooks-core
public static Exports getExports(final ApplicationContext appContext)
{
Exports exports = (Exports) appContext.getAttribute(Exports.class);
if (exports == null)
{
return NULL_EXPORTS;
}
return exports;
}
代码示例来源:origin: org.milyn/milyn-smooks-all
/**
* Gets the Map of RuleProviders that exist in the Smooks AppcliationContext.
*
* @param context The Smooks {@link ApplicationContext}.
* @return Map<String, RuleProvider> The Map of rule providers. The String key is the name of the rule provider.
*/
@SuppressWarnings("unchecked")
public static Map<String, RuleProvider> getRuleProviders(final ApplicationContext context)
{
return (Map<String, RuleProvider>) context.getAttribute(RuleProvider.class);
}
代码示例来源:origin: org.milyn/milyn-smooks-all
public static Exports getExports(final ApplicationContext appContext)
{
Exports exports = (Exports) appContext.getAttribute(Exports.class);
if (exports == null)
{
return NULL_EXPORTS;
}
return exports;
}
代码示例来源:origin: smooks/smooks
public static Exports getExports(final ApplicationContext appContext)
{
Exports exports = (Exports) appContext.getAttribute(Exports.class);
if (exports == null)
{
return NULL_EXPORTS;
}
return exports;
}
代码示例来源:origin: org.milyn/milyn-smooks-core
public static Exports getExports(final ApplicationContext appContext)
{
Exports exports = (Exports) appContext.getAttribute(Exports.class);
if (exports == null)
{
return NULL_EXPORTS;
}
return exports;
}
代码示例来源:origin: org.milyn/milyn-smooks-all
private CamelContext getCamelContext() {
if (camelContext == null)
return (CamelContext) applicationContext.getAttribute(CamelContext.class);
else
return camelContext;
}
代码示例来源:origin: org.virtuslab/milyn-smooks-rules
/**
* Gets the Map of RuleProviders that exist in the Smooks AppcliationContext.
*
* @param context The Smooks {@link ApplicationContext}.
* @return Map<String, RuleProvider> The Map of rule providers. The String key is the name of the rule provider.
*/
@SuppressWarnings("unchecked")
public static Map<String, RuleProvider> getRuleProviders(final ApplicationContext context)
{
return (Map<String, RuleProvider>) context.getAttribute(RuleProvider.class);
}
代码示例来源:origin: org.milyn/milyn-smooks-rules
/**
* Gets the Map of RuleProviders that exist in the Smooks AppcliationContext.
*
* @param context The Smooks {@link ApplicationContext}.
* @return Map<String, RuleProvider> The Map of rule providers. The String key is the name of the rule provider.
*/
@SuppressWarnings("unchecked")
public static Map<String, RuleProvider> getRuleProviders(final ApplicationContext context)
{
return (Map<String, RuleProvider>) context.getAttribute(RuleProvider.class);
}
代码示例来源:origin: org.milyn/milyn-smooks-core
@SuppressWarnings("unchecked")
private static LinkedHashMap<String, ContentDeliveryConfig> getDeliveryConfigTable(ApplicationContext applicationContext) {
return (LinkedHashMap) applicationContext.getAttribute(DELIVERY_CONFIG_TABLE_CTX_KEY);
}
代码示例来源:origin: org.milyn/milyn-smooks-all
public static ModelSet get(ApplicationContext appContext) {
return (ModelSet) appContext.getAttribute(ModelSet.class);
}
}
代码示例来源:origin: smooks/smooks
/**
* Get the prefix-to-namespace mannings from the {@link ApplicationContext}.
* @param appContext The {@link ApplicationContext}.
* @return The prefix-to-namespace mannings.
*/
public static Properties getMappings(ApplicationContext appContext) {
Properties properties = (Properties) appContext.getAttribute(NamespaceMappings.class);
if(properties == null) {
return new Properties();
}
return properties;
}
代码示例来源:origin: org.milyn/milyn-smooks-all
/**
* Get the prefix-to-namespace mannings from the {@link ApplicationContext}.
* @param appContext The {@link ApplicationContext}.
* @return The prefix-to-namespace mannings.
*/
public static Properties getMappings(ApplicationContext appContext) {
Properties properties = (Properties) appContext.getAttribute(NamespaceMappings.class);
if(properties == null) {
return new Properties();
}
return properties;
}
代码示例来源:origin: org.virtuslab/milyn-smooks-core
/**
* Get the prefix-to-namespace mannings from the {@link ApplicationContext}.
* @param appContext The {@link ApplicationContext}.
* @return The prefix-to-namespace mannings.
*/
public static Properties getMappings(ApplicationContext appContext) {
Properties properties = (Properties) appContext.getAttribute(NamespaceMappings.class);
if(properties == null) {
return new Properties();
}
return properties;
}
代码示例来源:origin: org.milyn/milyn-smooks-core
/**
* Get the prefix-to-namespace mannings from the {@link ApplicationContext}.
* @param appContext The {@link ApplicationContext}.
* @return The prefix-to-namespace mannings.
*/
public static Properties getMappings(ApplicationContext appContext) {
Properties properties = (Properties) appContext.getAttribute(NamespaceMappings.class);
if(properties == null) {
return new Properties();
}
return properties;
}
代码示例来源:origin: smooks/smooks
@SuppressWarnings("unchecked")
private static Map<String, BeanRuntimeInfo> getRuntimeInfoMap(ApplicationContext appContext) {
Map<String, BeanRuntimeInfo> runtimeInfoMap = (Map<String, BeanRuntimeInfo>) appContext.getAttribute(CONTEXT_KEY);
if(runtimeInfoMap == null) {
runtimeInfoMap = new HashMap<String, BeanRuntimeInfo>();
appContext.setAttribute(CONTEXT_KEY, runtimeInfoMap);
}
return runtimeInfoMap;
}
代码示例来源:origin: smooks/smooks
public static Map<Class<?>, Map<String, BeanWriter>> getBeanWriters(ApplicationContext appContext) {
Map<Class<?>, Map<String, BeanWriter>> beanWriters = (Map<Class<?>, Map<String, BeanWriter>>) appContext.getAttribute(BeanWriter.class);
if(beanWriters == null) {
beanWriters = new HashMap<Class<?>, Map<String, BeanWriter>>();
appContext.setAttribute(BeanWriter.class, beanWriters);
}
return beanWriters;
}
}
代码示例来源:origin: org.milyn/milyn-smooks-javabean
public static Map<Class<?>, Map<String, BeanWriter>> getBeanWriters(ApplicationContext appContext) {
Map<Class<?>, Map<String, BeanWriter>> beanWriters = (Map<Class<?>, Map<String, BeanWriter>>) appContext.getAttribute(BeanWriter.class);
if(beanWriters == null) {
beanWriters = new HashMap<Class<?>, Map<String, BeanWriter>>();
appContext.setAttribute(BeanWriter.class, beanWriters);
}
return beanWriters;
}
}
代码示例来源:origin: org.milyn/milyn-smooks-all
@SuppressWarnings("unchecked")
private static Map<String, BeanRuntimeInfo> getRuntimeInfoMap(ApplicationContext appContext) {
Map<String, BeanRuntimeInfo> runtimeInfoMap = (Map<String, BeanRuntimeInfo>) appContext.getAttribute(CONTEXT_KEY);
if(runtimeInfoMap == null) {
runtimeInfoMap = new HashMap<String, BeanRuntimeInfo>();
appContext.setAttribute(CONTEXT_KEY, runtimeInfoMap);
}
return runtimeInfoMap;
}
代码示例来源:origin: org.milyn/milyn-smooks-javabean
@SuppressWarnings("unchecked")
private static Map<String, BeanRuntimeInfo> getRuntimeInfoMap(ApplicationContext appContext) {
Map<String, BeanRuntimeInfo> runtimeInfoMap = (Map<String, BeanRuntimeInfo>) appContext.getAttribute(CONTEXT_KEY);
if(runtimeInfoMap == null) {
runtimeInfoMap = new HashMap<String, BeanRuntimeInfo>();
appContext.setAttribute(CONTEXT_KEY, runtimeInfoMap);
}
return runtimeInfoMap;
}
代码示例来源:origin: org.milyn/milyn-smooks-all
public static LocatorIndex getLocatorIndex(ApplicationContext applicationContext) {
LocatorIndex counter = (LocatorIndex) applicationContext.getAttribute(CONTEXT);
if(counter == null) {
counter = new LocatorIndex();
applicationContext.setAttribute(CONTEXT, counter);
}
return counter;
}
内容来源于网络,如有侵权,请联系作者删除!