| 1 |
|
package uk.co.badgersinfoil.asxsd; |
| 2 |
|
|
| 3 |
|
import org.eclipse.xsd.XSDConcreteComponent; |
| 4 |
|
import uk.co.badgersinfoil.metaas.ActionScriptFactory; |
| 5 |
|
import uk.co.badgersinfoil.metaas.ActionScriptProject; |
| 6 |
|
import uk.co.badgersinfoil.metaas.dom.ASExpression; |
| 7 |
|
import uk.co.badgersinfoil.metaas.dom.ASMethod; |
| 8 |
|
import uk.co.badgersinfoil.metaas.dom.StatementContainer; |
| 9 |
|
|
| 10 |
|
public interface CodegenContext { |
| 11 |
|
|
| 12 |
|
public ActionScriptProject getProject(); |
| 13 |
|
|
| 14 |
|
public MappingRegistry getRegistry(); |
| 15 |
|
|
| 16 |
|
public ActionScriptFactory getFactory(); |
| 17 |
|
|
| 18 |
|
public TypeDescriptor typeDescriptorFor(XSDConcreteComponent component); |
| 19 |
|
|
| 20 |
|
public TypeDescriptor createTypeDescriptor(XSDConcreteComponent component); |
| 21 |
|
|
| 22 |
|
public String createTypeNameFor(XSDConcreteComponent component); |
| 23 |
|
|
| 24 |
|
public CodegenRole getCurrentRole(); |
| 25 |
|
public void setCurrentRole(CodegenRole role); |
| 26 |
|
|
| 27 |
|
public void generateCode(XSDConcreteComponent component); |
| 28 |
|
|
| 29 |
|
public MappingFunction functionFor(XSDConcreteComponent component); |
| 30 |
|
|
| 31 |
|
public MappingFunction createFunctionRef(XSDConcreteComponent component); |
| 32 |
|
public ASMethod createFunction(XSDConcreteComponent component); |
| 33 |
|
|
| 34 |
|
public MappingFunction getOrCreateFunction(XSDConcreteComponent component); |
| 35 |
|
|
| 36 |
|
public TypeDescriptor getOrCreateType(XSDConcreteComponent component); |
| 37 |
|
|
| 38 |
|
public StatementContainer getCurrentMethodCode(); |
| 39 |
|
|
| 40 |
|
public void setCurrentMethodCode(StatementContainer code); |
| 41 |
|
|
| 42 |
|
|
| 43 |
|
public UnmarshalBuilder getUnmarshalBuilder(); |
| 44 |
|
|
| 45 |
|
|
| 46 |
|
public MarshalBuilder getMarshalBuilder(); |
| 47 |
|
|
| 48 |
|
|
| 49 |
|
public TypeBuilder getTypeBuilder(); |
| 50 |
|
|
| 51 |
|
public String variableNameFor(XSDConcreteComponent component); |
| 52 |
|
|
| 53 |
|
public void setAttribute(String key, Object value); |
| 54 |
|
|
| 55 |
|
public Object getAttribute(String key); |
| 56 |
|
|
| 57 |
|
public void pushAttrScope(); |
| 58 |
|
|
| 59 |
|
public void popAttrScope(); |
| 60 |
|
|
| 61 |
|
public MappingFunctionStore getMappingFunctionStore(); |
| 62 |
|
|
| 63 |
|
public ASExpression createExpression(XSDConcreteComponent component); |
| 64 |
|
|
| 65 |
|
public String toVariableName(String baseName); |
| 66 |
|
} |