| java.lang.Object uk.org.ponder.saxalizer.MethodAnalyser
MethodAnalyser | public class MethodAnalyser implements PropertyAccessor(Code) | | One instance of a MethodAnalyser is stored for each SAXalizable class that
the SAXalizer discovers; this instance is returned when a call is made to
getMethodAnalyser with an object of the SAXalizable class as
argument. MethodAnalysers are cached in a static hashtable indexed by the
SAXalizable class.
Some "bean-sense" has been retroactively blown into this class, which dates
from the dinosaur SAXalizer days of 2000, with the retrofit of the
PropertyAccessor interface. Its structure still needs a little
work though, since it still maintains separate collections for "tag" and
"attribute" methods &c.
|
Constructor Summary | |
| MethodAnalyser(Class objclass, SAXalizerMapperEntry entry, SAXalizerMappingContext context) This constructor locates SAXAccessMethodSpec objects for objects of the
supplied class from all available static and dynamic sources, sorts them
into tag and attribute methods while condensing together set and get
specifications into single entries, and returns a MethodAnalyser object
with the specs resolved into Method and Field accessors ready for use. |
allgetters | public SAXAccessMethod[] allgetters(Code) | | A flat array of ALL accessors for the target class. This will be the most
efficient means of using introspection information, and is populated on
construction of this MethodAnalyser.
|
tagmethods | public SAXAccessMethodHash tagmethods(Code) | | Each of the four types of SAXAccessMethods supported, being get and set
methods for subtags and attributes.
|
MethodAnalyser | MethodAnalyser(Class objclass, SAXalizerMapperEntry entry, SAXalizerMappingContext context)(Code) | | This constructor locates SAXAccessMethodSpec objects for objects of the
supplied class from all available static and dynamic sources, sorts them
into tag and attribute methods while condensing together set and get
specifications into single entries, and returns a MethodAnalyser object
with the specs resolved into Method and Field accessors ready for use.
Parameters: objclass - The class of the object to be inspected. Parameters: o - Either the object to be inspected for accessors, or its class inthe case construction is to be deferred until the last possiblemoment (it implements SAXalizable &c) Parameters: entry - A SAXalizerMapperEntry object already determined from dynamicsources. Parameters: context - The global mapping context. |
constructMethodAnalyser | static MethodAnalyser constructMethodAnalyser(Class objclass, SAXalizerMappingContext context)(Code) | | Given an object to be serialised/deserialised, return a MethodAnalyser
object containing a hash of Method and Field accessors. The
context stores a hash of these analysers so they are only
ever computed once per context per object class analysed.
Parameters: o - Either an object instance to be investigated, or an object class.If a class is specified and no analyser is registered, a newobject will be created using newInstance() to be queried. |
|
|