001 package org.extendj.ast; 002 003 import java.util.HashSet; 004 import java.io.File; 005 import java.util.Set; 006 import java.util.Collections; 007 import java.util.Collection; 008 import java.util.ArrayList; 009 import beaver.*; 010 import java.util.*; 011 import java.io.ByteArrayOutputStream; 012 import java.io.PrintStream; 013 import java.lang.reflect.InvocationTargetException; 014 import java.lang.reflect.Method; 015 import org.jastadd.util.*; 016 import java.util.zip.*; 017 import java.io.*; 018 import org.jastadd.util.PrettyPrintable; 019 import org.jastadd.util.PrettyPrinter; 020 import java.io.FileNotFoundException; 021 import java.io.BufferedInputStream; 022 import java.io.DataInputStream; 023 /** 024 * @ast class 025 * @aspect ConstantPool 026 * @declaredat /home/jesper/git/extendj/java4/backend/ConstantPool.jrag:430 027 */ 028 public class ConstantLong extends CPInfo { 029 030 private long val; 031 032 033 public ConstantLong(long val) { 034 this.val = val; 035 } 036 037 038 public void emit(DataOutputStream out) throws IOException { 039 out.writeByte(ConstantPool.CONSTANT_Long); 040 out.writeLong(val); 041 } 042 043 044 public int size() { 045 return 2; 046 } 047 048 049 public String toString() { 050 return pos + " ConstantLong: tag " + ConstantPool.CONSTANT_Long + ", bytes: " + val; 051 } 052 053 054 }