
com.linkare.zas.aspectj.accessinfo.JoinPointStaticPart Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zas-impl Show documentation
Show all versions of zas-impl Show documentation
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 org.aspectj.lang.JoinPoint.StaticPart;
import com.linkare.zas.api.ISignature;
import com.linkare.zas.api.ISourceLocation;
import com.linkare.zas.api.JoinPointKind;
import com.linkare.zas.api.IJoinPoint.IStaticPart;
/**
* The AspectJ implementation of the IStaticPart
interface.
*
* @author Paulo Zenida
*
*/
public class JoinPointStaticPart implements IStaticPart {
private StaticPart delegate;
private ISignature signature;
private ISourceLocation sourceLocation;
/**
*
* @param delegate
* The delegate to set.
*/
public JoinPointStaticPart(StaticPart delegate) {
this.delegate = delegate;
}
/**
* @see org.aspectj.lang.JoinPoint.StaticPart#getKind()
*/
public JoinPointKind getKind() {
return JoinPointKind.fromDescription(delegate.getKind());
}
/**
* @see org.aspectj.lang.JoinPoint.StaticPart#getSignature()
*/
public ISignature getSignature() {
if (signature == null) {
signature = new Signature(delegate.getSignature());
}
return signature;
}
/**
* @see org.aspectj.lang.JoinPoint.StaticPart#getSourceLocation()
*/
public ISourceLocation getSourceLocation() {
if (sourceLocation == null) {
return new SourceLocation(delegate.getSourceLocation());
}
return sourceLocation;
}
/**
* @see org.aspectj.lang.JoinPoint.StaticPart#toLongString()
*/
public String toLongString() {
return delegate.toLongString();
}
/**
* @see org.aspectj.lang.JoinPoint.StaticPart#toShortString()
*/
public String toShortString() {
return delegate.toShortString();
}
/**
* @see org.aspectj.lang.JoinPoint.StaticPart#toString()
*/
@Override
public String toString() {
return delegate.toString();
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof JoinPointStaticPart)) {
return false;
}
final JoinPointStaticPart other = (JoinPointStaticPart) obj;
return (other.delegate.equals(this.delegate));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy