All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.linkare.zas.aspectj.accessinfo.SourceLocation Maven / Gradle / Ivy

package com.linkare.zas.aspectj.accessinfo;

import com.linkare.zas.api.ISourceLocation;

/**
 * The AspectJ implemenattion of the ISourceLocation interface.
 * 
 * @author Paulo Zenida
 * 
 */
public class SourceLocation implements ISourceLocation {

    private org.aspectj.lang.reflect.SourceLocation delegate = null;

    /**
     * 
     * @param delegate
     *            The delegate to set.
     */
    public SourceLocation(org.aspectj.lang.reflect.SourceLocation delegate) {
	this.delegate = delegate;
    }

    /**
     * @deprecated
     * @see org.aspectj.lang.reflect.SourceLocation#getColumn()
     */
    public int getColumn() {
	return delegate.getColumn();
    }

    /**
     * @see org.aspectj.lang.reflect.SourceLocation#getFileName()
     */
    public String getFileName() {
	return delegate.getFileName();
    }

    /**
     * @see org.aspectj.lang.reflect.SourceLocation#getLine()
     */
    public int getLine() {
	return delegate.getLine();
    }

    /**
     * @see org.aspectj.lang.reflect.SourceLocation#getWithinType()
     */
    @SuppressWarnings("unchecked")
    public Class getWithinType() {
	return delegate.getWithinType();
    }

    @Override
    public boolean equals(Object obj) {
	if (!(obj instanceof SourceLocation)) {
	    return false;
	}
	final SourceLocation other = (SourceLocation) obj;
	return (other.delegate.equals(this.delegate));
    }
}