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

io.lenar.easy.log.support.signature.SignatureMap Maven / Gradle / Ivy

The newest version!
package io.lenar.easy.log.support.signature;

import org.aspectj.lang.ProceedingJoinPoint;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

public class SignatureMap {

    private ConcurrentMap signatures;

    public SignatureMap() {
        this.signatures = new ConcurrentHashMap<>();
    }

    public EasyLogSignature get(ProceedingJoinPoint jp) {
        String key = jp.toLongString();
        if (signatures.containsKey(key)) {
            return signatures.get(key);
        }
        EasyLogSignature signature = new EasyLogSignature(new JPSignature(jp));
        signatures.put(key, signature);
        return signature;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy