/src/main/scala/de/tud/cs/st/bat/canonical/reader/Constant_PoolBinding.scala

http://github.com/Delors/BAT · Scala · 129 lines · 57 code · 34 blank · 38 comment · 0 complexity · 014ec8a4c5677c6313e6391049eb216b MD5 · raw file

  1. /* License (BSD Style License):
  2. * Copyright (c) 2009, 2011
  3. * Software Technology Group
  4. * Department of Computer Science
  5. * Technische Universit?t Darmstadt
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions are met:
  10. *
  11. * - Redistributions of source code must retain the above copyright notice,
  12. * this list of conditions and the following disclaimer.
  13. * - Redistributions in binary form must reproduce the above copyright notice,
  14. * this list of conditions and the following disclaimer in the documentation
  15. * and/or other materials provided with the distribution.
  16. * - Neither the name of the Software Technology Group or Technische
  17. * Universit?t Darmstadt nor the names of its contributors may be used to
  18. * endorse or promote products derived from this software without specific
  19. * prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  22. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  25. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  26. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  27. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  28. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  29. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  30. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  31. * POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. package de.tud.cs.st.bat
  34. package canonical
  35. package reader
  36. import de.tud.cs.st.bat.reader.Constant_PoolReader
  37. /**
  38. * Representation of the constant pool as specified by the JVM Specification.
  39. * (This representation does not provide any abstraction.)
  40. *
  41. * @author Michael Eichberg
  42. */
  43. trait Constant_PoolBinding extends Constant_PoolReader {
  44. type Constant_Pool_Entry = ConstantPoolEntries.Constant_Pool_Entry
  45. val Constant_Pool_EntryManifest: ClassManifest[Constant_Pool_Entry] = implicitly
  46. type CONSTANT_Class_info = ConstantPoolEntries.CONSTANT_Class_info
  47. type CONSTANT_Fieldref_info = ConstantPoolEntries.CONSTANT_Fieldref_info
  48. type CONSTANT_Methodref_info = ConstantPoolEntries.CONSTANT_Methodref_info
  49. type CONSTANT_InterfaceMethodref_info = ConstantPoolEntries.CONSTANT_InterfaceMethodref_info
  50. type CONSTANT_String_info = ConstantPoolEntries.CONSTANT_String_info
  51. type CONSTANT_Integer_info = ConstantPoolEntries.CONSTANT_Integer_info
  52. type CONSTANT_Float_info = ConstantPoolEntries.CONSTANT_Float_info
  53. type CONSTANT_Long_info = ConstantPoolEntries.CONSTANT_Long_info
  54. type CONSTANT_Double_info = ConstantPoolEntries.CONSTANT_Double_info
  55. type CONSTANT_NameAndType_info = ConstantPoolEntries.CONSTANT_NameAndType_info
  56. type CONSTANT_Utf8_info = ConstantPoolEntries.CONSTANT_Utf8_info
  57. type CONSTANT_MethodHandle_info = ConstantPoolEntries.CONSTANT_MethodHandle_info
  58. type CONSTANT_MethodType_info = ConstantPoolEntries.CONSTANT_MethodType_info
  59. type CONSTANT_InvokeDynamic_info = ConstantPoolEntries.CONSTANT_InvokeDynamic_info
  60. import ConstantPoolEntries._
  61. def CONSTANT_Class_info(i: Int): CONSTANT_Class_info =
  62. new CONSTANT_Class_info(i)
  63. def CONSTANT_Double_info(d: Double): CONSTANT_Double_info =
  64. new CONSTANT_Double_info(d)
  65. def CONSTANT_Float_info(f: Float): CONSTANT_Float_info =
  66. new CONSTANT_Float_info(f)
  67. def CONSTANT_Integer_info(i: Int): CONSTANT_Integer_info =
  68. new CONSTANT_Integer_info(i)
  69. def CONSTANT_Long_info(l: Long): CONSTANT_Long_info =
  70. new CONSTANT_Long_info(l)
  71. def CONSTANT_Utf8_info(s: String): CONSTANT_Utf8_info =
  72. new CONSTANT_Utf8_info(s)
  73. def CONSTANT_String_info(i: Int): CONSTANT_String_info =
  74. new CONSTANT_String_info(i)
  75. def CONSTANT_Fieldref_info(class_index: Int,
  76. name_and_type_index: Int): CONSTANT_Fieldref_info =
  77. new CONSTANT_Fieldref_info(class_index, name_and_type_index)
  78. def CONSTANT_Methodref_info(class_index: Int,
  79. name_and_type_index: Int): CONSTANT_Methodref_info =
  80. new CONSTANT_Methodref_info(class_index, name_and_type_index)
  81. def CONSTANT_InterfaceMethodref_info(class_index: Int,
  82. name_and_type_index: Int): CONSTANT_InterfaceMethodref_info =
  83. new CONSTANT_InterfaceMethodref_info(class_index, name_and_type_index)
  84. def CONSTANT_NameAndType_info(name_index: Int,
  85. descriptor_index: Int): CONSTANT_NameAndType_info =
  86. new CONSTANT_NameAndType_info(name_index, descriptor_index)
  87. def CONSTANT_MethodHandle_info(reference_kind: Int,
  88. reference_index: Int): CONSTANT_MethodHandle_info =
  89. new CONSTANT_MethodHandle_info(ReferenceKind(reference_kind), reference_index)
  90. def CONSTANT_MethodType_info(descriptor_index: Int): CONSTANT_MethodType_info =
  91. new CONSTANT_MethodType_info(descriptor_index)
  92. def CONSTANT_InvokeDynamic_info(bootstrap_method_attr_index: Int,
  93. name_and_type_index: Int): CONSTANT_InvokeDynamic_info =
  94. new CONSTANT_InvokeDynamic_info(bootstrap_method_attr_index, name_and_type_index)
  95. }