// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) deadcode 
// Source File Name:   TagImpl.java

package com.sun.tools.javadoc;

import com.sun.javadoc.*;

// Referenced classes of package com.sun.tools.javadoc:
//            Comment, DocImpl, DocEnv

class TagImpl
    implements Tag
{

    public Doc holder()
    {
        return holder;
    }

    public SourcePosition position()
    {
        return holder.position();
    }

    public Tag[] firstSentenceTags()
    {
        return Comment.firstSentenceTags(holder, text);
    }

    public Tag[] inlineTags()
    {
        return Comment.getInlineTags(holder, text);
    }

    DocEnv docenv()
    {
        return holder.env;
    }

    public String kind()
    {
        return name;
    }

    public String name()
    {
        return name;
    }

    public String text()
    {
        return text;
    }

    public String toString()
    {
        return name + ":" + text;
    }

    String[] divideAtWhite()
    {
        String as[] = new String[2];
        int i = text.length();
        as[0] = text;
        as[1] = "";
        int j = 0;
        do
        {
            if(j >= i)
                break;
            char c = text.charAt(j);
            if(Character.isWhitespace(c))
            {
                as[0] = text.substring(0, j);
                do
                {
                    if(j >= i)
                        break;
                    char c1 = text.charAt(j);
                    if(!Character.isWhitespace(c1))
                    {
                        as[1] = text.substring(j, i);
                        break;
                    }
                    j++;
                } while(true);
                break;
            }
            j++;
        } while(true);
        return as;
    }

    TagImpl(DocImpl docimpl, String s, String s1)
    {
        holder = docimpl;
        name = s;
        text = s1;
    }

    protected final String text;
    protected final String name;
    protected final DocImpl holder;
}
