src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSAllCM.java
changeset 47359 e1a6c0168741
parent 47216 71c04702a3d5
child 48409 5ab69533994b
equal deleted inserted replaced
47358:d07d5f7cab35 47359:e1a6c0168741
     1 /*
     1 /*
     2  * Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
       
     3  * @LastModified: Oct 2017
     3  */
     4  */
     4 /*
     5 /*
     5  * Licensed to the Apache Software Foundation (ASF) under one or more
     6  * Licensed to the Apache Software Foundation (ASF) under one or more
     6  * contributor license agreements.  See the NOTICE file distributed with
     7  * contributor license agreements.  See the NOTICE file distributed with
     7  * this work for additional information regarding copyright ownership.
     8  * this work for additional information regarding copyright ownership.
    18  * limitations under the License.
    19  * limitations under the License.
    19  */
    20  */
    20 
    21 
    21 package com.sun.org.apache.xerces.internal.impl.xs.models;
    22 package com.sun.org.apache.xerces.internal.impl.xs.models;
    22 
    23 
    23 import com.sun.org.apache.xerces.internal.xni.QName;
       
    24 import com.sun.org.apache.xerces.internal.impl.xs.XSElementDecl;
       
    25 import com.sun.org.apache.xerces.internal.impl.xs.SubstitutionGroupHandler;
    24 import com.sun.org.apache.xerces.internal.impl.xs.SubstitutionGroupHandler;
    26 import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaException;
    25 import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaException;
    27 import com.sun.org.apache.xerces.internal.impl.xs.XSConstraints;
    26 import com.sun.org.apache.xerces.internal.impl.xs.XSConstraints;
       
    27 import com.sun.org.apache.xerces.internal.impl.xs.XSElementDecl;
       
    28 import com.sun.org.apache.xerces.internal.xni.QName;
    28 import java.util.ArrayList;
    29 import java.util.ArrayList;
       
    30 import java.util.List;
    29 
    31 
    30 /**
    32 /**
    31  * XSAllCM implements XSCMValidator and handles <all>.
    33  * XSAllCM implements XSCMValidator and handles <all>.
    32  *
    34  *
    33  * @xerces.internal
    35  * @xerces.internal
   201      *
   203      *
   202      * @param state  the current state
   204      * @param state  the current state
   203      * @return       a list whose entries are instances of
   205      * @return       a list whose entries are instances of
   204      *               either XSWildcardDecl or XSElementDecl.
   206      *               either XSWildcardDecl or XSElementDecl.
   205      */
   207      */
   206     public ArrayList whatCanGoHere(int[] state) {
   208     public List<Object> whatCanGoHere(int[] state) {
   207         ArrayList ret = new ArrayList();
   209         List<Object> ret = new ArrayList<>();
   208         for (int i = 0; i < fNumElements; i++) {
   210         for (int i = 0; i < fNumElements; i++) {
   209             // we only try to look for a matching decl if we have not seen
   211             // we only try to look for a matching decl if we have not seen
   210             // this element yet.
   212             // this element yet.
   211             if (state[i+1] == STATE_START) {
   213             if (state[i+1] == STATE_START) {
   212                 ret.add(fAllElements[i]);
   214                 ret.add(fAllElements[i]);
   213             }
   215             }
   214         }
   216         }
   215         return ret;
   217         return ret;
   216     }
   218     }
   217 
   219 
   218     public ArrayList checkMinMaxBounds() {
   220     public List<String> checkMinMaxBounds() {
   219         return null;
   221         return null;
   220     }
   222     }
   221 
   223 
   222     public int [] occurenceInfo(int[] state) {
   224     public int [] occurenceInfo(int[] state) {
   223         return null;
   225         return null;