Class JamClassBuilder
- java.lang.Object
-
- org.apache.xmlbeans.impl.jam.provider.JamClassBuilder
-
- Direct Known Subclasses:
CachedClassBuilder
,CompositeJamClassBuilder
,JavadocClassBuilder
,ParserClassBuilder
,ReflectClassBuilder
public abstract class JamClassBuilder extends java.lang.Object
Implemented by providers to build and initialize classes on demand. The main responsibility a JAM provider has is writing an extension of this class.
-
-
Constructor Summary
Constructors Constructor Description JamClassBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract MClass
build(java.lang.String packageName, java.lang.String className)
This is called by JAM when it attempts to load a class.void
init(ElementContext ctx)
This method is called by JAM to initialize this class builder.
-
-
-
Method Detail
-
init
public void init(ElementContext ctx)
This method is called by JAM to initialize this class builder. Extending classes can override this to perform additional initialization work (just remember to call super.init()!).- Parameters:
ctx
-
-
build
public abstract MClass build(java.lang.String packageName, java.lang.String className)
This is called by JAM when it attempts to load a class. If the builder has access to an artifact (typically a java source or classfile) that represents the given type, it should call createClassToBuild() to get a new instance of MClass and then return it. No caching should be performed - if an MClass is going to be returned, it should be a new instance returned by createClassToBuild()
If no artififact is available, the builder should just return null, signalling that other JamClassBuilders should attempt to build the class.
- Parameters:
packageName
-className
-- Returns:
-
-