Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 4fb01aa

Browse files
committed
implementation of #findVisibleXxxTypes replaced with delegation to TypeLookup
1 parent 1014f04 commit 4fb01aa

1 file changed

Lines changed: 3 additions & 29 deletions

File tree

  • core/runtime/src/main/java/org/apache/polygene/runtime/structure

core/runtime/src/main/java/org/apache/polygene/runtime/structure/ModuleModel.java

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -273,45 +273,19 @@ public Stream<? extends ValueDescriptor> findVisibleValueTypes()
273273
@Override
274274
public Stream<? extends EntityDescriptor> findVisibleEntityTypes()
275275
{
276-
return concat( visibleEntities( module ),
277-
concat(
278-
layer().visibleEntities( layer ),
279-
concat(
280-
layer().visibleEntities( application ),
281-
layer().usedLayers().layers().flatMap( layer1 -> layer1.visibleEntities( application ) )
282-
)
283-
)
284-
);
276+
return typeLookup.allEntities();
285277
}
286278

287279
@Override
288280
public Stream<? extends TransientDescriptor> findVisibleTransientTypes()
289281
{
290-
return concat( visibleTransients( module ),
291-
concat(
292-
layer().visibleTransients( layer ),
293-
concat(
294-
layer().visibleTransients( application ),
295-
layer().usedLayers()
296-
.layers()
297-
.flatMap( layer1 -> layer1.visibleTransients( application ) )
298-
)
299-
)
300-
);
282+
return typeLookup.allTransients();
301283
}
302284

303285
@Override
304286
public Stream<? extends ObjectDescriptor> findVisibleObjectTypes()
305287
{
306-
return concat( visibleObjects( module ),
307-
concat(
308-
layer().visibleObjects( layer ),
309-
concat(
310-
layer().visibleObjects( application ),
311-
layer().usedLayers().layers().flatMap( layer -> layer.visibleObjects( application ) )
312-
)
313-
)
314-
);
288+
return typeLookup.allObjects();
315289
}
316290

317291
public Stream<? extends ObjectDescriptor> visibleObjects( Visibility visibility )

0 commit comments

Comments
 (0)