jp.hishidama.html.lexer.token
クラス Tag

java.lang.Object
  上位を拡張 jp.hishidama.html.lexer.token.Token
      上位を拡張 jp.hishidama.html.lexer.token.ListToken
          上位を拡張 jp.hishidama.html.lexer.token.Markup
              上位を拡張 jp.hishidama.html.lexer.token.NamedMarkup
                  上位を拡張 jp.hishidama.html.lexer.token.Tag
すべての実装されたインタフェース:
Cloneable, Iterable<Token>

public class Tag
extends NamedMarkup

HtHtmlLexerトークン(タグ).

タグ(<tag〜>や</tag>)を保持するトークン。

導入されたバージョン:
2009.01.10
作成者:
ひしだま

コンストラクタの概要
Tag()
          コンストラクター.
 
メソッドの概要
 void addAttribute(AttributeToken attr)
          属性追加.
 Tag clone()
           
 AttributeToken getAttribute(String name)
          属性取得.
 List<AttributeToken> getAttributeList()
          属性一覧取得.
 String getAttributeValue(String name)
          属性値取得.
 boolean isEnd()
          終了タグ判断.
 boolean isStart()
          開始タグ判断.
 
クラス jp.hishidama.html.lexer.token.NamedMarkup から継承されたメソッド
getName, getNameAtom, setName, setName
 
クラス jp.hishidama.html.lexer.token.Markup から継承されたメソッド
addSkip, getTag1, getTag1Atom, getTag2, getTag2Atom, setTag1, setTag2
 
クラス jp.hishidama.html.lexer.token.ListToken から継承されたメソッド
add, add, calcLine, cut, cut, cutWithPreSkip, get, getLast, getTextLength, iterator, remove, set, size, writeTo, writeTo
 
クラス jp.hishidama.html.lexer.token.Token から継承されたメソッド
getLine, getText
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Tag

public Tag()
コンストラクター.

メソッドの詳細

clone

public Tag clone()
          throws CloneNotSupportedException
オーバーライド:
クラス Markup 内の clone
例外:
CloneNotSupportedException
導入されたバージョン:
2009.02.07

addAttribute

public void addAttribute(AttributeToken attr)
属性追加.

パラメータ:
attr - 属性

isStart

public boolean isStart()
開始タグ判断.

戻り値:
開始タグ(TAGOが「<」)のとき、true

isEnd

public boolean isEnd()
終了タグ判断.

戻り値:
終了タグ(TAGOが「</」または TAGCが「/>」)のとき、true

getAttributeList

public List<AttributeToken> getAttributeList()
属性一覧取得.

戻り値:
属性一覧(必ずnull以外)

getAttribute

public AttributeToken getAttribute(String name)
属性取得.

パラメータ:
name - 属性名(大文字小文字は無視される)
戻り値:
属性(存在しない場合、null)

getAttributeValue

public String getAttributeValue(String name)
属性値取得.

パラメータ:
name - 属性名(大文字小文字は無視される)
戻り値:
属性値(存在しない場合、null)