FileDocCategorySizeDatePackage
ElemDesc.javaAPI DocJava SE 6 API5506Tue Jun 10 00:23:06 BST 2008com.sun.org.apache.xml.internal.serializer

ElemDesc

public final class ElemDesc extends Object
This class has a series of flags (bit values) that describe an HTML element This class is public because XSLTC uses it, it is not a public API.
xsl.usage
internal

Fields Summary
private int
m_flags
Bit flags to tell about this element type.
private StringToIntTable
m_attrs
Table of attribute names to integers, which contain bit flags telling about the attributes.
static final int
EMPTY
Bit position if this element type is empty.
private static final int
FLOW
Bit position if this element type is a flow.
static final int
BLOCK
Bit position if this element type is a block.
static final int
BLOCKFORM
Bit position if this element type is a block form.
static final int
BLOCKFORMFIELDSET
Bit position if this element type is a block form field set.
private static final int
CDATA
Bit position if this element type is CDATA.
private static final int
PCDATA
Bit position if this element type is PCDATA.
static final int
RAW
Bit position if this element type is should be raw characters.
private static final int
INLINE
Bit position if this element type should be inlined.
private static final int
INLINEA
Bit position if this element type is INLINEA.
static final int
INLINELABEL
Bit position if this element type is an inline label.
static final int
FONTSTYLE
Bit position if this element type is a font style.
static final int
PHRASE
Bit position if this element type is a phrase.
static final int
FORMCTRL
Bit position if this element type is a form control.
static final int
SPECIAL
Bit position if this element type is ???.
static final int
ASPECIAL
Bit position if this element type is ???.
static final int
HEADMISC
Bit position if this element type is an odd header element.
static final int
HEAD
Bit position if this element type is a head element (i.e. H1, H2, etc.)
static final int
LIST
Bit position if this element type is a list.
static final int
PREFORMATTED
Bit position if this element type is a preformatted type.
static final int
WHITESPACESENSITIVE
Bit position if this element type is whitespace sensitive.
static final int
HEADELEM
Bit position if this element type is a header element (i.e. HEAD).
private static final int
HTMLELEM
Bit position if this element is the "HTML" element
public static final int
ATTRURL
Bit position if this attribute type is a URL.
public static final int
ATTREMPTY
Bit position if this attribute type is an empty type.
Constructors Summary
ElemDesc(int flags)
Construct an ElemDesc from a set of bit flags.

param
flags Bit flags that describe the basic properties of this element type.


                               
     
    
        m_flags = flags;
    
Methods Summary
intgetFlags()

        return m_flags;
    
private booleanis(int flags)
Tell if this element type has the basic bit properties that are passed as an argument.

param
flags Bit flags that describe the basic properties of interest.
return
true if any of the flag bits are true.


        // int which = (m_flags & flags);
        return (m_flags & flags) != 0;
    
public booleanisAttrFlagSet(java.lang.String name, int flags)
Tell if any of the bits of interest are set for a named attribute type.

param
name non-null reference to attribute name, in any case.
param
flags flag mask.
return
true if any of the flags are set for the named attribute.

        return (null != m_attrs)
            ? ((m_attrs.getIgnoreCase(name) & flags) != 0)
            : false;
    
voidsetAttr(java.lang.String name, int flags)
Set an attribute name and it's bit properties.

param
name non-null name of attribute, in upper case.
param
flags flag bits.


        if (null == m_attrs)
            m_attrs = new StringToIntTable();

        m_attrs.put(name, flags);