com.sun.msv.verifier.regexp.ElementToken Maven / Gradle / Ivy
/*
* @(#)$Id: ElementToken.java,v 1.8 2003/06/09 20:37:46 kk122374 Exp $
*
* Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
*
*/
package com.sun.msv.verifier.regexp;
import com.sun.msv.grammar.ElementExp;
/**
* a token that represents an XML element.
*
* @author Kohsuke KAWAGUCHI
*/
public class ElementToken extends Token {
final ElementExp[] acceptedPatterns;
public ElementToken( ElementExp[] acceptedPatterns ) {
this.acceptedPatterns = acceptedPatterns;
}
public boolean match( ElementExp exp ) {
// since every subpatterns are reused, object identity is enough
// to judge the equality of patterns
for( int i=0; i © 2015 - 2025 Weber Informatics LLC | Privacy Policy