org.jace.parser.constant.IntegerConstant Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jace-core-java Show documentation
Show all versions of jace-core-java Show documentation
Jace core module, Java source-code
package org.jace.parser.constant;
import java.io.DataOutputStream;
import java.io.IOException;
public class IntegerConstant implements Constant
{
private final int bytes;
public IntegerConstant(int bytes)
{
this.bytes = bytes;
}
@Override
public int getSize()
{
return 1;
}
@Override
public Object getValue()
{
return Integer.valueOf(bytes);
}
@Override
public void write(DataOutputStream output) throws IOException
{
output.writeByte(new IntegerConstantReader().getTag());
output.writeInt(bytes);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy