@Test public void testEntitySpecFromOsgi() throws Exception { TestResourceUnavailableException.throwIfResourceUnavailable(getClass(), OsgiTestResources.BROOKLYN_TEST_MORE_ENTITIES_V1_PATH); ManagementContext mgmt = LocalManagementContextForTests.builder(true).disableOsgi(false).build(); try { RegisteredType ci = OsgiVersionMoreEntityTest.addMoreEntityV1(mgmt, "1.0"); EntitySpec<DynamicCluster> spec = EntitySpec.create(DynamicCluster.class) .configure(DynamicCluster.INITIAL_SIZE, 1) .configure(DynamicCluster.MEMBER_SPEC, mgmt.getTypeRegistry().createSpec(ci, null, EntitySpec.class)); serializer.setLookupContext(new LookupContextImpl(mgmt, ImmutableList.<Entity>of(), ImmutableList.<Location>of(), ImmutableList.<Policy>of(), ImmutableList.<Enricher>of(), ImmutableList.<Feed>of(), ImmutableList.<CatalogItem<?,?>>of(), true)); assertSerializeAndDeserialize(spec); } finally { Entities.destroyAllCatching(mgmt); } }
@Override public void setLookupContext(LookupContext lookupContext) { this.lookupContext = checkNotNull(lookupContext, "lookupContext"); }
XmlMementoSerializer extends XmlSerializer<T> implements MementoSerializer<T> { @Override public void setLookupContext(LookupContext lookupContext) { this.lookupContext = checkNotNull(lookupContext, "lookupContext"); } }
XmlMementoSerializer extends XmlSerializer<T> implements MementoSerializer<T> { @Override public void setLookupContext(LookupContext lookupContext) { this.lookupContext = checkNotNull(lookupContext, "lookupContext"); } XmlMementoSerializer(ClassLoader classLoader);  XmlMementoSerializer(ClassLoader classLoader, Map<String, String> deserializingClassRenames); }
XmlMementoSerializer extends XmlSerializer<T> implements MementoSerializer<T> { @Override public void setLookupContext(LookupContext lookupContext) { this.lookupContext = checkNotNull(lookupContext, "lookupContext"); } XmlMementoSerializer(ClassLoader classLoader);  XmlMementoSerializer(ClassLoader classLoader, Map<String, String> deserializingClassRenames); @Override void serialize(Object object, Writer writer); @Override void setLookupContext(LookupContext lookupContext); @Override void unsetLookupContext(); }
XmlMementoSerializer extends XmlSerializer<T> implements MementoSerializer<T> { @Override public void setLookupContext(LookupContext lookupContext) { this.lookupContext = checkNotNull(lookupContext, "lookupContext"); } XmlMementoSerializer(ClassLoader classLoader);  XmlMementoSerializer(ClassLoader classLoader, Map<String, String> deserializingClassRenames); @Override void serialize(Object object, Writer writer); @Override void setLookupContext(LookupContext lookupContext); @Override void unsetLookupContext();  }