Created
December 18, 2019 03:02
-
-
Save upangka/762f343717fb363f9a62d09f5a2d3f58 to your computer and use it in GitHub Desktop.
使用lombok的注解的代码,通过使用delombok来查看lombok为我们生成的代码
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lombok.Data; | |
@Data | |
public class CardInfo { | |
private Integer cardId; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by delombok at Wed Dec 18 10:59:34 CST 2019 | |
public class CardInfo { | |
private Integer cardId; | |
@java.lang.SuppressWarnings("all") | |
public CardInfo() { | |
} | |
@java.lang.SuppressWarnings("all") | |
public Integer getCardId() { | |
return this.cardId; | |
} | |
@java.lang.SuppressWarnings("all") | |
public void setCardId(final Integer cardId) { | |
this.cardId = cardId; | |
} | |
@java.lang.Override | |
@java.lang.SuppressWarnings("all") | |
public boolean equals(final java.lang.Object o) { | |
if (o == this) return true; | |
if (!(o instanceof CardInfo)) return false; | |
final CardInfo other = (CardInfo) o; | |
if (!other.canEqual((java.lang.Object) this)) return false; | |
final java.lang.Object this$cardId = this.getCardId(); | |
final java.lang.Object other$cardId = other.getCardId(); | |
if (this$cardId == null ? other$cardId != null : !this$cardId.equals(other$cardId)) return false; | |
return true; | |
} | |
@java.lang.SuppressWarnings("all") | |
protected boolean canEqual(final java.lang.Object other) { | |
return other instanceof CardInfo; | |
} | |
@java.lang.Override | |
@java.lang.SuppressWarnings("all") | |
public int hashCode() { | |
final int PRIME = 59; | |
int result = 1; | |
final java.lang.Object $cardId = this.getCardId(); | |
result = result * PRIME + ($cardId == null ? 43 : $cardId.hashCode()); | |
return result; | |
} | |
@java.lang.Override | |
@java.lang.SuppressWarnings("all") | |
public java.lang.String toString() { | |
return "CardInfo(cardId=" + this.getCardId() + ")"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
文件目录中有
运行命令delombok command
java -jar lombok-1.18.6.jar delombok -p CardInfo.java > GenerateRes.java