SimpleTypeImpl.java revision 325
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public abstract class SimpleTypeImpl extends DeclarationImpl
{
boolean _anonymous,
}
public XSType[] listSubstitutables() {
return Util.listSubstitutables(this);
}
st.redefinedBy = this;
}
/**
* Number of times this component redefines other components.
*/
private short redefiningCount = 0;
public XSSimpleType getRedefinedBy() {
return redefinedBy;
}
public int getRedefinedCount() {
int i=0;
i++;
return i;
}
public boolean isPrimitive() { return false; }
public XSListSimpleType getBaseListType() {
return getSimpleBaseType().getBaseListType();
}
public XSUnionSimpleType getBaseUnionType() {
return getSimpleBaseType().getBaseUnionType();
}
}
public final XSSimpleType asSimpleType() { return this; }
public boolean isDerivedFrom(XSType t) {
XSType x = this;
while(true) {
if(t==x)
return true;
XSType s = x.getBaseType();
if(s==x)
return false;
x = s;
}
}
public final boolean isSimpleType() { return true; }
public final boolean isComplexType() { return false; }
public boolean isRestriction() { return false; }
public boolean isList() { return false; }
public boolean isUnion() { return false; }
visitor.simpleType(this);
}
visitor.simpleType(this);
}
return function.simpleType(this);
}
return function.simpleType(this);
}
// Ref.ContentType implementation
public XSContentType getContentType() { return this; }
// Ref.SimpleType implementation
public XSSimpleType getType() { return this; }
}