@Test public void serializeNew() throws Exception { TransactionPack tp = new TransactionPack(); tp.setContract(c); checkSimplePack(tp); }
public void setContract(Contract c) { if (contract != null) throw new IllegalArgumentException("the contract is already added"); contract = c; packedBinary = null; extractAllSubItemsAndReferenced(c); c.setTransactionPack(this); for (PrivateKey key : c.getKeysToSignWith()) addKeys(key.getPublicKey()); }
TransactionPack implements BiSerializable { public void setContract(Contract c) { if (contract != null) throw new IllegalArgumentException("the contract is already added"); contract = c; packedBinary = null; extractAllSubItemsAndReferenced(c); c.setTransactionPack(this); for (PrivateKey key : c.getKeysToSignWith()) addKeys(key.getPublicKey()); } }
TransactionPack implements BiSerializable { public void setContract(Contract c) { if (contract != null) throw new IllegalArgumentException("the contract is already added"); contract = c; packedBinary = null; extractAllSubItemsAndReferenced(c); c.setTransactionPack(this); for (PrivateKey key : c.getKeysToSignWith()) addKeys(key.getPublicKey()); } TransactionPack(Contract contract);  TransactionPack(); }
TransactionPack implements BiSerializable { public void setContract(Contract c) { if (contract != null) throw new IllegalArgumentException("the contract is already added"); contract = c; packedBinary = null; extractAllSubItemsAndReferenced(c); c.setTransactionPack(this); for (PrivateKey key : c.getKeysToSignWith()) addKeys(key.getPublicKey()); } TransactionPack(Contract contract);  TransactionPack(); Contract getContract(); Contract getSubItem(HashId id); Contract getSubItem(HashIdentifiable hid); Set<PublicKey> getKeysForPack(); void setContract(Contract c); void addSubItem(Contract subItem); void addReferencedItem(Contract referencedItem); void addTag(String tag, HashId itemId); void addKeys(PublicKey... keys); @Override void deserialize(Binder data, BiDeserializer deserializer); @Override Binder serialize(BiSerializer serializer); final boolean isReconstructed(); static TransactionPack unpack(byte[] packOrContractBytes, boolean allowNonTransactions); static TransactionPack unpack(byte[] packOrContractBytes); synchronized byte[] pack(); Map<HashId, Contract> getSubItems(); Map<HashId, Contract> getReferencedItems(); Map<String, Contract> getTags(); void trace(); void setReferenceContextKeys(Set<PublicKey> referenceEffectiveKeys); Contract findContract(Predicate<Contract> function); }
TransactionPack implements BiSerializable { public void setContract(Contract c) { if (contract != null) throw new IllegalArgumentException("the contract is already added"); contract = c; packedBinary = null; extractAllSubItemsAndReferenced(c); c.setTransactionPack(this); for (PrivateKey key : c.getKeysToSignWith()) addKeys(key.getPublicKey()); } TransactionPack(Contract contract);  TransactionPack(); Contract getContract(); Contract getSubItem(HashId id); Contract getSubItem(HashIdentifiable hid); Set<PublicKey> getKeysForPack(); void setContract(Contract c); void addSubItem(Contract subItem); void addReferencedItem(Contract referencedItem); void addTag(String tag, HashId itemId); void addKeys(PublicKey... keys); @Override void deserialize(Binder data, BiDeserializer deserializer); @Override Binder serialize(BiSerializer serializer); final boolean isReconstructed(); static TransactionPack unpack(byte[] packOrContractBytes, boolean allowNonTransactions); static TransactionPack unpack(byte[] packOrContractBytes); synchronized byte[] pack(); Map<HashId, Contract> getSubItems(); Map<HashId, Contract> getReferencedItems(); Map<String, Contract> getTags(); void trace(); void setReferenceContextKeys(Set<PublicKey> referenceEffectiveKeys); Contract findContract(Predicate<Contract> function); static final String TAG_PREFIX_RESERVED; }