forked from JavaTX/JavaCompilerCore
JavaClassName aufräumen
This commit is contained in:
parent
3ab96a3ed7
commit
aed261c807
@ -7,19 +7,13 @@ import java.util.List;
|
|||||||
* Stellt den Namen einer Java Klasse dar.
|
* Stellt den Namen einer Java Klasse dar.
|
||||||
* Dieser kann auch den Packagenamen mit beinhalten: de.dhbwstuttgart.typeinference.Menge
|
* Dieser kann auch den Packagenamen mit beinhalten: de.dhbwstuttgart.typeinference.Menge
|
||||||
*
|
*
|
||||||
* @author janulrich
|
* @author Andreas Stadelmeier
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class JavaClassName {
|
public class JavaClassName {
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private PackageName packageName;
|
private PackageName packageName;
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO: JavaClassName sollten aus den Assumptions generiert werden.
|
|
||||||
* Diese wissen, welche Typen und Typnamen existieren und können direkt auf Korrektheit prüfen.
|
|
||||||
*/
|
|
||||||
JavaClassName(String name){
|
JavaClassName(String name){
|
||||||
if(name == null)throw new NullPointerException();
|
if(name == null)throw new NullPointerException();
|
||||||
|
|
||||||
@ -38,15 +32,14 @@ public class JavaClassName {
|
|||||||
this.name = names[names.length-1];
|
this.name = names[names.length-1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Auto-generated hashCode:
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
final int prime = 31;
|
final int prime = 31;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
||||||
//result = prime * result
|
result = prime * result
|
||||||
// + ((packageName == null) ? 0 : packageName.hashCode()); //PackageName does not infect hashCode
|
+ ((packageName == null) ? 0 : packageName.hashCode()); //PackageName does not infect hashCode
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user