Package org.cruxframework.crux.core.rebind.screen.widget.declarative

Examples of org.cruxframework.crux.core.rebind.screen.widget.declarative.TagChildren


    {
    String className = factoryType.getCanonicalName();
    if (!added.contains(className))
    {
      added.add(className);
      TagChildren tagChildren = factoryType.getAnnotation(TagChildren.class);
      if (tagChildren != null)
      {
        for (TagChild child : tagChildren.value())
        {
          Class<?> childProcessor = child.value();
          TagChildLazyConditions lazyConditions = childProcessor.getAnnotation(TagChildLazyConditions.class);
          if (lazyConditions != null)
          {
View Full Code Here


   */
  private void generateChild(PrintStream out, TagChild tagChild, boolean parentIsAnAgregator, String library) throws SecurityException, NoSuchMethodException
  {
    Class<? extends WidgetChildProcessor<?>> processorClass = tagChild.value();
    TagConstraints attributes = ViewUtils.getChildTagConstraintsAnnotation(processorClass);
    TagChildren children = processorClass.getAnnotation(TagChildren.class);

    if (ChoiceChildProcessor.class.isAssignableFrom(processorClass))
    {
      generateChoiceChild(out, attributes, children, library)
    }
View Full Code Here

   * @param processorClass
   * @throws NoSuchMethodException
   */
  private void generateChildren(PrintStream out, String library, Class<?> processorClass) throws NoSuchMethodException
  {
    TagChildren annot = processorClass.getAnnotation(TagChildren.class);
    if (annot != null)
    {
      if (annot.value().length > 1)
      {
        out.println("<xs:sequence>");
        for (TagChild tagChild : annot.value())
        {
          generateChild(out, tagChild, true, library);
        }
        out.println("</xs:sequence>");
      }
      else if (annot.value().length == 1)
      {
        TagChild tagChild = annot.value()[0];
        if (isChildAnAgregator(tagChild))
        {
          generateChild(out, tagChild, true, library);
        }
        else
View Full Code Here

   * @param processorClass
   * @return
   */
  private boolean hasTextChild(Class<?> processorClass)
  {
    TagChildren tagChildren = processorClass.getAnnotation(TagChildren.class);
    return (tagChildren != null && tagChildren.value().length == 1 && TextChildProcessor.class.isAssignableFrom(tagChildren.value()[0].value()));
  }
View Full Code Here

          allowed.maxOccurs = Integer.parseInt(maxOccurs);
        }
      }
      else if (AllChildProcessor.class.isAssignableFrom(child.value()) || SequenceChildProcessor.class.isAssignableFrom(child.value()))
      {
        TagChildren tagChildren = childProcessorType.getAnnotation(TagChildren.class);
        if (tagChildren != null)
        {
          AllowedOccurences allowedChildren = getAllowedChildrenNumber(tagChildren);
          mergeAllowedOccurrences(allowed, allowedChildren);
        }
View Full Code Here

    {
      return scannedProcessors.get(processorClass.getCanonicalName());
    }
    ChildrenProcessor result = null;
   
    TagChildren children = processorClass.getAnnotation(TagChildren.class);
   
    if (children != null && mustGenerateChildrenProcessMethod(children))
    {
      AllowedOccurences allowedChildren = getAllowedChildrenNumber(children);
      boolean acceptNoChildren = (allowedChildren.minOccurs == 0);
      if (allowedChildren.maxOccurs == 1)
      {
        TagChild child = children.value()[0];
        result = createChildrenProcessorForSingleChild(processorClass, child, acceptNoChildren);
      }
      else
      {
        result = createChildrenProcessorForMultipleChildren(processorClass, children, acceptNoChildren, isAgregatorChild);
View Full Code Here

TOP

Related Classes of org.cruxframework.crux.core.rebind.screen.widget.declarative.TagChildren

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.