2 u014293072 u014293072 于 2017.09.14 17:14 提问

calss怎么更改?求大神帮忙! 20C

package com.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="t_allnetwork")
public class AllNetwork
{
@Id
@GeneratedValue
private Integer id;
@Column(nullable=false, columnDefinition="INT default 0")
private int isDelete;
private String client;
private String clientPhone;
private String clientAddress;
private String clientIndustry;
private String signTime;
private String startTime;
private String overTime;
private Date createDate;
private String des;
@OneToOne
private User introducer;
@OneToOne
private User user;
@OneToMany(mappedBy="allNetwork", cascade={javax.persistence.CascadeType.REFRESH, javax.persistence.CascadeType.MERGE, javax.persistence.CascadeType.PERSIST})
private List jobLogs = new ArrayList();
private Integer type;
private String conclusion;

public String toDesString()
{
String s = "";
s = s + "客户:" + getClient();
s = s + ", 客户电话:" + getClientPhone();
s = s + ", 签单时间:" + getSignTime();
s = s + ", 开始时间:" + getStartTime();
s = s + ", 到期时间:" + getOverTime();
s = s + ", 行业:" + getClientIndustry();
s = s + ", 客户地址:" + getClientAddress();
s = s + ", 签单人员:" + getIntroducer().getName();
s = s + ", 技术人员:" + getUser().getName();
s = s + ", 任务描述:" + getDes().replaceAll("<[^>]*>", "_");
s = s + ", 结论:" + getDes().replaceAll("<[^>]*>", "_");
return s;
}

public String toTitleString()
{
String s = "全网通";
s = s + ", 客户:" + getClient();
s = s + " 行业:" + getClientIndustry();
return s;
}

public Integer getId()
{
return this.id;
}

public void setId(Integer id)
{
this.id = id;
}

public int getIsDelete()
{
return this.isDelete;
}

public void setIsDelete(int isDelete)
{
this.isDelete = isDelete;
}

public Date getCreateDate()
{
return this.createDate;
}

public void setCreateDate(Date createDate)
{
this.createDate = createDate;
}

public String getDes()
{
return this.des;
}

public void setDes(String des)
{
this.des = des;
}

public User getIntroducer()
{
return this.introducer;
}

public void setIntroducer(User introducer)
{
this.introducer = introducer;
}

public User getUser()
{
return this.user;
}

public void setUser(User user)
{
this.user = user;
}

public List getJobLogs()
{
return this.jobLogs;
}

public void setJobLogs(List jobLogs)
{
this.jobLogs = jobLogs;
}

public Integer getType()
{
return this.type;
}

public void setType(Integer type)
{
this.type = type;
}

public String getConclusion()
{
return this.conclusion;
}

public void setConclusion(String conclusion)
{
this.conclusion = conclusion;
}

public String getClient()
{
return this.client;
}

public void setClient(String client)
{
this.client = client;
}

public String getClientPhone()
{
return this.clientPhone;
}

public void setClientPhone(String clientPhone)
{
this.clientPhone = clientPhone;
}

public String getClientIndustry()
{
return this.clientIndustry;
}

public void setClientIndustry(String clientIndustry)
{
this.clientIndustry = clientIndustry;
}

public String getSignTime()
{
return this.signTime;
}

public void setSignTime(String signTime)
{
this.signTime = signTime;
}

public String getOverTime()
{
return this.overTime;
}

public void setOverTime(String overTime)
{
this.overTime = overTime;
}

public String getClientAddress()
{
return this.clientAddress;
}

public void setClientAddress(String clientAddress)
{
this.clientAddress = clientAddress;
}

public String getStartTime()
{
return this.startTime;
}

public void setStartTime(String startTime)
{
this.startTime = startTime;
}
}
这个是用反向编辑打开的,但是怎么编辑?

4个回答

q690080900
q690080900   2017.09.14 17:18

有两种方案 第一种 用你反编译的软件 生成java文件 修改该文件后 再编译为.class 覆盖掉原来的.class
第二种 把这段代码复制下来 到一个java文件里 修改后编译为.class 再覆盖掉原来的.class

q690080900
q690080900 回复嘉斌: 额 你具体怎么改的
2 个月之前 回复
u014293072
u014293072 改完文件就变小了,项目就打不开了!
2 个月之前 回复
Small_Mouse0
Small_Mouse0   Ds   Rxr 2017.09.14 17:16

这个是jpa的实体类??

感觉好像是,,,题主想要怎么编辑?

u014293072
u014293072 想改文字的地方
2 个月之前 回复
huang931027
huang931027   2017.09.14 17:17

兄弟,你别逗了,class文件怎么可能可以改呢。。。你可以先把这个反编译的东西保存成java文件,然后编译一下,再把这个文件覆盖掉就可以了

huang931027
huang931027 回复嘉斌: 基本不会的,只是变量的名字了一下,你没有这个文件的源码的话,只能这样,永远别想改class文件
2 个月之前 回复
u014293072
u014293072 反编辑的软件打开,但是保存成Java的格式,有不对的地方呀
2 个月之前 回复
privateobject
privateobject   2017.09.18 16:51

是不是单独改这个文件,编译时引用的jar没有造成编译的class文件其实是空的,你还是找到这个jar的源码文件,在修改并重新打个jar吧

Csdn user default icon
上传中...
上传图片
插入图片