热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.felix.ipojo.metadata.Element.()方法的使用及代码示例

本文整理了Java中org.apache.felix.ipojo.metadata.Element.<init>()方法的一些代码示例,展示了E

本文整理了Java中org.apache.felix.ipojo.metadata.Element.()方法的一些代码示例,展示了Element.()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.()方法的具体详情如下:
包路径:org.apache.felix.ipojo.metadata.Element
类名称:Element
方法名:

Element.介绍

[英]Creates an Element.
[中]

代码示例

代码示例来源:origin: org.wisdom-framework/wisdom-ipojo-module

/**
* @return the Component element.
*/
public static Element getComponentElement() {
return new Element(COMPONENT, "");
}
}

代码示例来源:origin: apache/felix

/**
* Build an {@link Element} using the provided namespace and local name.
*/
public static Element buildElement(final String namespace, final String name) {
return new Element(name, namespace);
}

代码示例来源:origin: apache/felix

private static Element transformElement(org.w3c.dom.Element xmlElement) {
return new Element(xmlElement.getLocalName(), xmlElement.getNamespaceURI());
}

代码示例来源:origin: apache/felix

/**
* Gets the component type description (Element-Attribute form).
* @return the component type description.
* @see org.apache.felix.ipojo.Factory#getDescription()
*/
public Element getDescription() {
// Can be null, if not already computed.
if (m_compOnentDesc== null) {
return new Element("No description available for " + m_factoryName, "");
}
return m_componentDesc.getDescription();
}

代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo

/**
* Gets the component type description (Element-Attribute form).
* @return the component type description.
* @see org.apache.felix.ipojo.Factory#getDescription()
*/
public Element getDescription() {
// Can be null, if not already computed.
if (m_compOnentDesc== null) {
return new Element("No description available for " + m_factoryName, "");
}
return m_componentDesc.getDescription();
}

代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo

/**
* Looks for the iPOJO-Components header
* in the given dictionary. Then, initializes the
* {@link ManifestMetadataParser#m_elements} list (adds the
* iPOJO root element) and parses the contained
* component type declarations and instance configurations.
* @param dict the given headers of the manifest file
* @throws ParseException if any error occurs
*/
public void parse(Dictionary dict) throws ParseException {
String compOnentClassesStr= (String) dict.get("iPOJO-Components");
// Add the ipojo element inside the element list
addElement(new Element("iPOJO", ""));
parseElements(componentClassesStr.trim());
}

代码示例来源:origin: apache/felix

/**
* Looks for the iPOJO-Components header
* in the given dictionary. Then, initializes the
* {@link ManifestMetadataParser#m_elements} list (adds the
* iPOJO root element) and parses the contained
* component type declarations and instance configurations.
* @param dict the given headers of the manifest file
* @throws ParseException if any error occurs
*/
public void parse(Dictionary dict) throws ParseException {
String compOnentClassesStr= (String) dict.get("iPOJO-Components");
// Add the ipojo element inside the element list
addElement(new Element("iPOJO", ""));
parseElements(componentClassesStr.trim());
}

代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo

/**
* Parses the given header, initialized the
* {@link ManifestMetadataParser#m_elements} list
* (adds the iPOJO element) and parses
* contained component type declarations and instance configurations.
* @param header the given header of the manifest file
* @throws ParseException if any error occurs
*/
public void parseHeader(String header) throws ParseException {
// Add the ipojo element inside the element list
addElement(new Element("iPOJO", ""));
parseElements(header.trim());
}

代码示例来源:origin: apache/felix

/**
* Parses the given header, initialized the
* {@link ManifestMetadataParser#m_elements} list
* (adds the iPOJO element) and parses
* contained component type declarations and instance configurations.
* @param header the given header of the manifest file
* @throws ParseException if any error occurs
*/
public void parseHeader(String header) throws ParseException {
// Add the ipojo element inside the element list
addElement(new Element("iPOJO", ""));
parseElements(header.trim());
}

代码示例来源:origin: org.wisdom-framework/wisdom-ipojo-module

/**
* Declares an instance.
*
* @param workbench the workbench
* @return the Instance element
*/
public static Element declareInstance(ComponentWorkbench workbench) {
Element instance = new Element("instance", "");
instance.addAttribute(new Attribute(COMPONENT, workbench.getType().getClassName()));
return instance;
}

代码示例来源:origin: apache/felix

/**
* Visit @Handler annotation attributes.
* @see org.objectweb.asm.AnnotationVisitor#visit(String, Object)
*/
public void visitEnd() {
Element cOntroller= new Element("controller", "");
controller.addAttribute(new Attribute("field", field));
workbench.getElements().put(controller, null);
}
}

代码示例来源:origin: org.wisdom-framework/wisdom-ipojo-module

/**
* Gets the 'provides' element.
*
* @return the provides element
*/
public static Element getProvidesElement(String specifications) {
Element provides = new Element("provides", "");
if (specificatiOns== null) {
return provides;
} else {
Attribute attribute = new Attribute("specifications", specifications);
provides.addAttribute(attribute);
return provides;
}
}

代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo.api

/**
* Gets the instance description in the Element-Attribute form.
* @return the root Element of the instance description
* @see org.apache.felix.ipojo.api.HandlerConfiguration#getElement()
*/
public Element getElement() {
ensureValidity();
Element instance = new Element("instance", "");
instance.addAttribute(new Attribute("component", m_type));
for (int i = 0; i Element elem = (Element) m_conf.get(i);
instance.addElement(elem);
}
return instance;
}
}

代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo.api

/**
* Adds a string property.
* @param name the property name
* @param value the property value
* @return the current instantiated sub-service
*/
public InstantiatedService addProperty(String name, String value) {
Element elem = new Element("property", "");
m_conf.add(elem);
elem.addAttribute(new Attribute("name", name));
elem.addAttribute(new Attribute("value", value));
return this;
}

代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo.api

/**
* Adds the string property.
* @param name property name
* @param value property value
* @return the current instance
*/
public Instance addProperty(String name, String value) {
Element elem = new Element("property", "");
m_conf.add(elem);
elem.addAttribute(new Attribute("name", name));
elem.addAttribute(new Attribute("value", value));
return this;
}

代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo.api

/**
* Sets the delegation policy of the given method.
* @param method the method name
* @param policy the delegation policy
* @return the current exported service.
*/
public ProvidedService setDelegation(String method, String policy) {
Element element = new Element("delegation", "");
element.addAttribute(new Attribute("method", method));
element.addAttribute(new Attribute("policy", policy));
m_delegation.add(element);
return this;
}

代码示例来源:origin: apache/felix

@Override
public void visitEnd() {
Element cb = new Element("callback", "");
cb.addAttribute(new Attribute("transition", transition.name().toLowerCase()));
cb.addAttribute(new Attribute("method", name));
workbench.getElements().put(cb, null);
}
}

代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo.api

/**
* Gets the provided element.
* @return the 'provides' element describing
* the current provided service.
*/
public Element getElement() {
ensureValidity();

Element dep = new Element("provides", "");
dep.addAttribute(new Attribute("action", "implement"));
dep.addAttribute(new Attribute("specification", m_specification));
for (int i = 0; i dep.addElement((Element) m_delegation.get(i));
}

return dep;
}

代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo

/**
* Gets handler information.
* This represent the actual state of the handler.
* @return the handler information.
*/
public Element getHandlerInfo() {
Element elem = new Element("Handler", "");
elem.addAttribute(new Attribute("name", m_handlerName));
if (isValid()) {
elem.addAttribute(new Attribute("state", "valid"));
} else {
elem.addAttribute(new Attribute("state", "invalid"));
}
return elem;
}

代码示例来源:origin: apache/felix

/**
* Gets handler information.
* This represent the actual state of the handler.
* @return the handler information.
*/
public Element getHandlerInfo() {
Element elem = new Element("Handler", "");
elem.addAttribute(new Attribute("name", m_handlerName));
if (isValid()) {
elem.addAttribute(new Attribute("state", "valid"));
} else {
elem.addAttribute(new Attribute("state", "invalid"));
}
return elem;
}

推荐阅读
author-avatar
mobiledu2502883527
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有