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/MethodEntry.java | 79 ++++++++++++------------------ 1 file changed, 31 insertions(+), 48 deletions(-) (limited to 'src/cuchaz/enigma/mapping/MethodEntry.java') diff --git a/src/cuchaz/enigma/mapping/MethodEntry.java b/src/cuchaz/enigma/mapping/MethodEntry.java index dbc1885..beb490d 100644 --- a/src/cuchaz/enigma/mapping/MethodEntry.java +++ b/src/cuchaz/enigma/mapping/MethodEntry.java @@ -14,31 +14,26 @@ import java.io.Serializable; import cuchaz.enigma.Util; -public class MethodEntry implements BehaviorEntry, Serializable -{ +public class MethodEntry implements BehaviorEntry, Serializable { + private static final long serialVersionUID = 4770915224467247458L; private ClassEntry m_classEntry; private String m_name; private String m_signature; - public MethodEntry( ClassEntry classEntry, String name, String signature ) - { - if( classEntry == null ) - { - throw new IllegalArgumentException( "Class cannot be null!" ); + public MethodEntry(ClassEntry classEntry, String name, String signature) { + if (classEntry == null) { + throw new IllegalArgumentException("Class cannot be null!"); } - if( name == null ) - { - throw new IllegalArgumentException( "Method name cannot be null!" ); + if (name == null) { + throw new IllegalArgumentException("Method name cannot be null!"); } - if( signature == null ) - { - throw new IllegalArgumentException( "Method signature cannot be null!" ); + if (signature == null) { + throw new IllegalArgumentException("Method signature cannot be null!"); } - if( name.startsWith( "<" ) ) - { - throw new IllegalArgumentException( "Don't use MethodEntry for a constructor!" ); + if (name.startsWith("<")) { + throw new IllegalArgumentException("Don't use MethodEntry for a constructor!"); } m_classEntry = classEntry; @@ -46,76 +41,64 @@ public class MethodEntry implements BehaviorEntry, Serializable m_signature = signature; } - public MethodEntry( MethodEntry other ) - { - m_classEntry = new ClassEntry( other.m_classEntry ); + public MethodEntry(MethodEntry other) { + m_classEntry = new ClassEntry(other.m_classEntry); m_name = other.m_name; m_signature = other.m_signature; } - public MethodEntry( MethodEntry other, String newClassName ) - { - m_classEntry = new ClassEntry( newClassName ); + public MethodEntry(MethodEntry other, String newClassName) { + m_classEntry = new ClassEntry(newClassName); m_name = other.m_name; m_signature = other.m_signature; } @Override - public ClassEntry getClassEntry( ) - { + public ClassEntry getClassEntry() { return m_classEntry; } @Override - public String getName( ) - { + public String getName() { return m_name; } @Override - public String getSignature( ) - { + public String getSignature() { return m_signature; } @Override - public String getClassName( ) - { + public String getClassName() { return m_classEntry.getName(); } @Override - public MethodEntry cloneToNewClass( ClassEntry classEntry ) - { - return new MethodEntry( this, classEntry.getName() ); + public MethodEntry cloneToNewClass(ClassEntry classEntry) { + return new MethodEntry(this, classEntry.getName()); } @Override - public int hashCode( ) - { - return Util.combineHashesOrdered( m_classEntry, m_name, m_signature ); + public int hashCode() { + return Util.combineHashesOrdered(m_classEntry, m_name, m_signature); } @Override - public boolean equals( Object other ) - { - if( other instanceof MethodEntry ) - { - return equals( (MethodEntry)other ); + public boolean equals(Object other) { + if (other instanceof MethodEntry) { + return equals((MethodEntry)other); } return false; } - public boolean equals( MethodEntry other ) - { - return m_classEntry.equals( other.m_classEntry ) - && m_name.equals( other.m_name ) - && m_signature.equals( other.m_signature ); + public boolean equals(MethodEntry other) { + return m_classEntry.equals(other.m_classEntry) + && m_name.equals(other.m_name) + && m_signature.equals(other.m_signature); } @Override - public String toString( ) - { + public String toString() { return m_classEntry.getName() + "." + m_name + m_signature; } } -- cgit v1.2.3