# HG changeset patch # User Doug Simon # Date 1422357938 -3600 # Node ID 7efef7005e534e650c4379ef2df9eb48a574f12a # Parent bb0f5ab57e1eb09781757b533df4e965b48a38e5 provide Stub.getStubs() method to access all installed stubs diff -r bb0f5ab57e1e -r 7efef7005e53 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java Tue Jan 27 12:24:44 2015 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java Tue Jan 27 12:25:38 2015 +0100 @@ -54,6 +54,8 @@ */ public abstract class Stub { + private static final List stubs = new ArrayList<>(); + /** * The linkage information for a call to this stub from compiled code. */ @@ -107,6 +109,14 @@ public Stub(HotSpotProviders providers, HotSpotForeignCallLinkage linkage) { this.linkage = linkage; this.providers = providers; + stubs.add(this); + } + + /** + * Gets an immutable view of all stubs that have been created. + */ + public static Collection getStubs() { + return Collections.unmodifiableList(stubs); } /**