// 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:   SourcePositionImpl.java

package com.sun.tools.javadoc;

import com.sun.javadoc.SourcePosition;
import com.sun.tools.javac.v8.util.Position;
import java.io.File;

class SourcePositionImpl
    implements SourcePosition
{

    public int column()
    {
        return Position.column(position);
    }

    public int line()
    {
        return Position.line(position);
    }

    public File file()
    {
        return filename != null ? new File(filename) : null;
    }

    public String toString()
    {
        if(position == 0)
            return filename;
        else
            return filename + ":" + Position.line(position);
    }

    private SourcePositionImpl(String s, int i)
    {
        filename = s;
        position = i;
    }

    public static SourcePosition make(String s, int i)
    {
        if(s == null)
            return null;
        else
            return new SourcePositionImpl(s, i);
    }

    String filename;
    int position;
}
