81 /** |
82 /** |
82 * Returns a map of class names to class bytes. |
83 * Returns a map of class names to class bytes. |
83 * @return map of class bytes |
84 * @return map of class bytes |
84 */ |
85 */ |
85 public Map<String, byte[]> getClassBytes() { |
86 public Map<String, byte[]> getClassBytes() { |
86 return classBytes; |
87 final Map<String, byte[]> clonedMap = new LinkedHashMap<>(); |
|
88 for (final Map.Entry<String, byte[]> entry : classBytes.entrySet()) { |
|
89 clonedMap.put(entry.getKey(), entry.getValue().clone()); |
|
90 } |
|
91 return clonedMap; |
87 } |
92 } |
88 |
93 |
89 /** |
94 /** |
90 * Returns the constants array. |
95 * Returns the constants array. |
91 * @return constants array |
96 * @return constants array |
92 */ |
97 */ |
93 public Object[] getConstants() { |
98 public Object[] getConstants() { |
94 return constants; |
99 return constants.clone(); |
95 } |
100 } |
96 |
101 |
97 Map<Integer, FunctionInitializer> getInitializers() { |
102 /** |
98 return initializers; |
103 * Returns the function initializers map. |
|
104 * @return The initializers map. |
|
105 */ |
|
106 public Map<Integer, FunctionInitializer> getInitializers() { |
|
107 final Map<Integer, FunctionInitializer> clonedMap = new LinkedHashMap<>(); |
|
108 for (final Map.Entry<Integer, FunctionInitializer> entry : initializers.entrySet()) { |
|
109 clonedMap.put(entry.getKey(), new FunctionInitializer(entry.getValue())); |
|
110 } |
|
111 return clonedMap; |
99 } |
112 } |
100 |
113 |
101 @Override |
114 @Override |
102 public int hashCode() { |
115 public int hashCode() { |
103 int hash = mainClassName.hashCode(); |
116 int hash = mainClassName.hashCode(); |