com.maxifier.mxcache.impl.resource.MxStaticResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mxcache-runtime Show documentation
Show all versions of mxcache-runtime Show documentation
Constains all classes necessary for launching a MxCache-instrumentated application
/*
* Copyright (c) 2008-2014 Maxifier Ltd. All Rights Reserved.
*/
package com.maxifier.mxcache.impl.resource;
import javax.annotation.Nonnull;
import java.io.ObjectStreamException;
/**
* @author Alexander Kochurov ([email protected])
*/
public class MxStaticResource extends MxResourceImpl {
public MxStaticResource(@Nonnull String name) {
super(null, name);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MxStaticResource that = (MxStaticResource) o;
return getName().equals(that.getName());
}
@Override
public int hashCode() {
return getName().hashCode();
}
private Object writeReplace() throws ObjectStreamException {
return new MxResourceSerializableImpl(this);
}
}