public final class SGStateInfo extends ClassInfoResolverImpl
Modifier and Type | Field and Description |
---|---|
static int |
NORMAL_STATUS
The SourceGenerator is still generating source.
|
static int |
STOP_STATUS
The SourceGenerator has been stopped by an error or by the user.
|
Modifier | Constructor and Description |
---|---|
protected |
SGStateInfo(Schema schema,
SourceGenerator sgen)
Creates a new SGStateInfo.
|
Modifier and Type | Method and Description |
---|---|
void |
bindSourceCode(Annotated annotated,
JClass[] classes)
Binds the given Annotated structure with its generated source classes.
|
Properties |
getCDRFile(String filename)
Returns the CDRFile (Properties file) associated with the given filename.
|
Enumeration<String> |
getCDRFilenames()
Returns the set of CDR file names.
|
FactoryState |
getCurrentFactoryState()
Returns the current FactoryState that holds information about the classes
being generated.
|
Dialog |
getDialog()
Returns the Dialog used for interacting with the user.
|
JClass |
getImportedSourceCode(String className)
Returns the JClass with the given name or null if no bindings have been
specified for a JClass with the name.
|
Map<String,JClass> |
getImportedSourcesByName()
Returns the sources as generated through XML schema imports.
|
MappingRoot |
getMapping(String filename)
Returns the Mapping file associated with the given filename.
|
Enumeration<String> |
getMappingFilenames()
Returns the set of mapping filenames.
|
String |
getPackageName()
Get package used when creating new classes.
|
JClass[] |
getSourceCode(Annotated annotated)
Returns the array of JClass for the given Annotated structure or null if
no bindings have been specified for the given Structure.
|
JClass |
getSourceCode(String className)
Returns the JClass with the given name or null if no bindings have been
specified for a JClass with the name.
|
SourceGenerator |
getSourceGenerator()
Returns the SourceGenerator instance being used.
|
Map<String,JClass> |
getSourcesByName()
Returns the sources as generated through XML schema imports.
|
int |
getStatusCode()
Returns the current status.
|
boolean |
getSuppressNonFatalWarnings()
Returns true if non-fatal warnings should be suppressed.
|
void |
setCDRFile(String filename,
Properties props)
Sets the CDR (ClassDescriptorResolver) file associated with the given
filename.
|
void |
setCurrentFactoryState(FactoryState state)
Sets the current FactoryState.
|
void |
setMapping(String filename,
MappingRoot mapping)
Sets the Mapping file associated with the given filename.
|
protected void |
setPackageName(String packageName)
Set package used when creating new classes.
|
void |
setStatusCode(int status)
Sets the current status code to the given one.
|
void |
storeImportedSourcesByName(Map<String,JClass> importedSourcesByName)
Stores generated sources as processed within an imported schema.
|
boolean |
verbose()
Returns the value of the verbose flag.
|
bindReference, keys, resolve
public static final int NORMAL_STATUS
public static final int STOP_STATUS
protected SGStateInfo(Schema schema, SourceGenerator sgen)
schema
- the Schema to generate source forsgen
- the SourceGenerator instancepublic String getPackageName()
protected void setPackageName(String packageName)
packageName
- Package used when creating new classes.public void bindSourceCode(Annotated annotated, JClass[] classes)
annotated
- the Annotated structure to add JClass bindings forclasses
- the JClass[] to bindpublic void storeImportedSourcesByName(Map<String,JClass> importedSourcesByName)
importedSourcesByName
- Generated sources as processed within an imported schema.public JClass[] getSourceCode(Annotated annotated)
annotated
- the Annotated structure to searchpublic JClass getSourceCode(String className)
className
- the name of the JClasspublic JClass getImportedSourceCode(String className)
className
- the name of the JClasspublic MappingRoot getMapping(String filename)
filename
- The filename to search for a Mapping File associationpublic Properties getCDRFile(String filename)
filename
- filename of the CDR file to be processedpublic Enumeration<String> getCDRFilenames()
public Enumeration<String> getMappingFilenames()
public int getStatusCode()
public SourceGenerator getSourceGenerator()
public boolean getSuppressNonFatalWarnings()
public void setCDRFile(String filename, Properties props)
filename
- the filename associated with the CDR fileprops
- the Properties filepublic void setMapping(String filename, MappingRoot mapping)
filename
- the filename associated with the Mappingmapping
- the MappingRootpublic Dialog getDialog()
public void setStatusCode(int status)
status
- the new status codepublic boolean verbose()
public FactoryState getCurrentFactoryState()
public void setCurrentFactoryState(FactoryState state)
state
- the current FactoryStategetCurrentFactoryState()
public Map<String,JClass> getImportedSourcesByName()
Copyright © 2022. All rights reserved.