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

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

Go to download

The AspectJ based implementation of the Zas project. This is the new version of the implementation of Zas which, initially, started as a M.Sc. thesis project by Paulo Zenida at ISCTE.

The newest version!
package com.linkare.zas.aspectj.accessinfo;

import com.linkare.zas.api.IJoinPointEnclosingStaticPart;
import com.linkare.zas.api.ISignature;
import com.linkare.zas.api.ISourceLocation;
import com.linkare.zas.api.JoinPointKind;

/**
 * The AspectJ implementation of the IJoinPointEnclosingStaticPart interface.
 * 
 * @author Paulo Zenida
 * 
 */
public class JoinPointEnclosingStaticPart implements IJoinPointEnclosingStaticPart {

    private org.aspectj.lang.JoinPoint.StaticPart delegate = null;

    private ISignature signature;

    private ISourceLocation sourceLocation;

    public JoinPointEnclosingStaticPart(final org.aspectj.lang.JoinPoint.StaticPart joinPointEnclosingStaticPart) {
	this.delegate = joinPointEnclosingStaticPart;
    }

    public JoinPointKind getKind() {
	return JoinPointKind.fromDescription(delegate.getKind());
    }

    public ISignature getSignature() {
	if (signature == null) {
	    signature = new Signature(delegate.getSignature());
	}
	return signature;
    }

    public ISourceLocation getSourceLocation() {
	if (sourceLocation == null) {
	    sourceLocation = new SourceLocation(delegate.getSourceLocation());
	}
	return sourceLocation;
    }

    public String toLongString() {
	return delegate.toLongString();
    }

    public String toShortString() {
	return delegate.toShortString();
    }

    @Override
    public String toString() {
	return delegate.toString();
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy