下面列出了怎么用java.beans.beancontext.BeanContextSupport的API类实例代码及写法,或者点击链接到github查看源代码。
/** Create nodes for a given key.
* @param key the key
* @return child nodes for this key or null if there should be no
* nodes for this key
*/
protected Node[] createNodes(Object key) {
Object ctx = bean;
if (bean == null) return new Node[0];
try {
if (key instanceof BeanContextSupport) {
BeanContextSupport bcs = (BeanContextSupport)key;
if (((BeanContext) ctx).contains (bcs.getBeanContextPeer())) {
// sometimes a BeanContextSupport occures in the list of
// beans children even there is its peer. we think that
// it is desirable to hide the context if the peer is
// also present
return new Node[0];
}
}
return new Node[] { new BeanContextNode (key, task) };
} catch (IntrospectionException ex) {
// ignore the exception
return new Node[0];
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
public static void main(String[] args) {
BeanContextSupport context = new BeanContextSupport(); // The BeanContext
BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
// add the bean to the context
context.add(bean);
try {
context.getResourceAsStream("Readme.txt", bean);
}
catch (Exception exception) {
throw new Error("unexpected exception", exception);
}
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}
public BeanContextSupport getBeanContext() {
return this.beanContext;
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}
protected List getObject() {
List<BeanContext> list = new ArrayList<BeanContext>();
list.add(fill(new BeanContextSupport()));
list.add(fill(new BeanContextServicesSupport()));
return list;
}