From 959cb5fd4f9586ec3bd265b452fe25fe1db82e3f Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 13 Jan 2015 23:25:04 -0500 Subject: source format change don't hate me too much if you were planning a big merge. =P --- src/cuchaz/enigma/mapping/ConstructorEntry.java | 99 +++++++++---------------- 1 file changed, 36 insertions(+), 63 deletions(-) (limited to 'src/cuchaz/enigma/mapping/ConstructorEntry.java') diff --git a/src/cuchaz/enigma/mapping/ConstructorEntry.java b/src/cuchaz/enigma/mapping/ConstructorEntry.java index d99d1c3..ea0535f 100644 --- a/src/cuchaz/enigma/mapping/ConstructorEntry.java +++ b/src/cuchaz/enigma/mapping/ConstructorEntry.java @@ -14,129 +14,102 @@ import java.io.Serializable; import cuchaz.enigma.Util; -public class ConstructorEntry implements BehaviorEntry, Serializable -{ +public class ConstructorEntry implements BehaviorEntry, Serializable { + private static final long serialVersionUID = -868346075317366758L; private ClassEntry m_classEntry; private String m_signature; - public ConstructorEntry( ClassEntry classEntry ) - { - this( classEntry, null ); + public ConstructorEntry(ClassEntry classEntry) { + this(classEntry, null); } - public ConstructorEntry( ClassEntry classEntry, String signature ) - { - if( classEntry == null ) - { - throw new IllegalArgumentException( "Class cannot be null!" ); + public ConstructorEntry(ClassEntry classEntry, String signature) { + if (classEntry == null) { + throw new IllegalArgumentException("Class cannot be null!"); } m_classEntry = classEntry; m_signature = signature; } - public ConstructorEntry( ConstructorEntry other ) - { - m_classEntry = new ClassEntry( other.m_classEntry ); + public ConstructorEntry(ConstructorEntry other) { + m_classEntry = new ClassEntry(other.m_classEntry); m_signature = other.m_signature; } - public ConstructorEntry( ConstructorEntry other, String newClassName ) - { - m_classEntry = new ClassEntry( newClassName ); + public ConstructorEntry(ConstructorEntry other, String newClassName) { + m_classEntry = new ClassEntry(newClassName); m_signature = other.m_signature; } @Override - public ClassEntry getClassEntry( ) - { + public ClassEntry getClassEntry() { return m_classEntry; } @Override - public String getName( ) - { - if( isStatic() ) - { + public String getName() { + if (isStatic()) { return ""; } return ""; } - public boolean isStatic( ) - { + public boolean isStatic() { return m_signature == null; } @Override - public String getSignature( ) - { + public String getSignature() { return m_signature; } @Override - public String getClassName( ) - { + public String getClassName() { return m_classEntry.getName(); } @Override - public ConstructorEntry cloneToNewClass( ClassEntry classEntry ) - { - return new ConstructorEntry( this, classEntry.getName() ); + public ConstructorEntry cloneToNewClass(ClassEntry classEntry) { + return new ConstructorEntry(this, classEntry.getName()); } @Override - public int hashCode( ) - { - if( isStatic() ) - { - return Util.combineHashesOrdered( m_classEntry ); - } - else - { - return Util.combineHashesOrdered( m_classEntry, m_signature ); + public int hashCode() { + if (isStatic()) { + return Util.combineHashesOrdered(m_classEntry); + } else { + return Util.combineHashesOrdered(m_classEntry, m_signature); } } @Override - public boolean equals( Object other ) - { - if( other instanceof ConstructorEntry ) - { - return equals( (ConstructorEntry)other ); + public boolean equals(Object other) { + if (other instanceof ConstructorEntry) { + return equals((ConstructorEntry)other); } return false; } - public boolean equals( ConstructorEntry other ) - { - if( isStatic() != other.isStatic() ) - { + public boolean equals(ConstructorEntry other) { + if (isStatic() != other.isStatic()) { return false; } - if( isStatic() ) - { - return m_classEntry.equals( other.m_classEntry ); - } - else - { - return m_classEntry.equals( other.m_classEntry ) && m_signature.equals( other.m_signature ); + if (isStatic()) { + return m_classEntry.equals(other.m_classEntry); + } else { + return m_classEntry.equals(other.m_classEntry) && m_signature.equals(other.m_signature); } } @Override - public String toString( ) - { - if( isStatic() ) - { + public String toString() { + if (isStatic()) { return m_classEntry.getName() + "." + getName(); - } - else - { + } else { return m_classEntry.getName() + "." + getName() + m_signature; } } -- cgit v1.2.3