/******************************************************************************* * Copyright (c) 2013-2014 Red Hat, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * JBoss by Red Hat - initial API and implementation *******************************************************************************/ package org.jboss.tools.arquillian.core.internal.archives; /** * * @author snjeza * */ public class ArchiveLocation { private String projectName; private String fullyQualifiedName; private String methodName; public ArchiveLocation(String projectName, String fullyQualifiedName, String methodName) { super(); this.projectName = projectName; this.fullyQualifiedName = fullyQualifiedName; this.methodName = methodName; } public String getProjectName() { return projectName; } public void setProjectName(String projectName) { this.projectName = projectName; } public String getFullyQualifiedName() { return fullyQualifiedName; } public void setFullyQualifiedName(String fullyQualifiedName) { this.fullyQualifiedName = fullyQualifiedName; } public String getMethodName() { return methodName; } public void setMethodName(String methodName) { this.methodName = methodName; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((fullyQualifiedName == null) ? 0 : fullyQualifiedName .hashCode()); result = prime * result + ((methodName == null) ? 0 : methodName.hashCode()); result = prime * result + ((projectName == null) ? 0 : projectName.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ArchiveLocation other = (ArchiveLocation) obj; if (fullyQualifiedName == null) { if (other.fullyQualifiedName != null) return false; } else if (!fullyQualifiedName.equals(other.fullyQualifiedName)) return false; if (methodName == null) { if (other.methodName != null) return false; } else if (!methodName.equals(other.methodName)) return false; if (projectName == null) { if (other.projectName != null) return false; } else if (!projectName.equals(other.projectName)) return false; return true; } @Override public String toString() { return "ArchivesLocation [projectName=" + projectName + ", fullyQualifiedName=" + fullyQualifiedName + ", methodName=" + methodName + "]"; } }