incubator-kato-spec mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Poole <>
Subject Updating the API to support optionality etc
Date Tue, 06 Oct 2009 11:48:34 GMT
I've not seen any responses to my queries on how optionality should work so
I'm going to go ahead and implement a basic mechanism

As a discussion point lets pick the   JavaClassLoader class.   It has two
methods for returning classes -  one for cached classes, one for defined
classes.   The semantics of the class also say that the cached classes list
is a superset of the defined classes list.

In an HPROF dump there is no record of cached classes so the list will
always be the same as the defined list.   I don't want to reduce the API
semantics by making  cached classes optional or that cached classes do not
have to be a superset of defined classes.  We can implement the required
behavior but just not from an HPROF dump.

My solution is  to introduce the first level of optionality by  having an
API version check on the Image and JavaRuntime API.   This version check
will return values that indicate the level of the API that is supported.

Initially the answer is either "legacy" or "1.0"  (or the equivilent)

"legacy" will mean that the implementation has the simplest level of support
while "1.0" will mean that the implementation supports the marked extra
functionality.   The API doc will be updated to indicate what is 1.0 level
of behavior.   So for the JavaClassLoader example  "legacy" support means
you can get lists of cached or defined classes but there is no expectation
that either of them will contain anything, and there is no requirement for
the cached classes list to be a superset of the defined.  For 1.0 support
the implementation must return cached classes and must support the superset

Doing this work is going to help shake out any edge conditions and no doubt
we will need to go further in defining optionality.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message