public class MockImplServiceWriter extends JavaClassWriter
Modifier and Type | Class and Description |
---|---|
protected static class |
MockImplServiceWriter.MethodType
The standard type of methods used in our Service contract.
|
Modifier and Type | Field and Description |
---|---|
protected ModelFinder |
finder |
protected List<ServiceMethod> |
methods |
protected ServiceContractModel |
model |
protected String |
servKey
Name of the service being operated on.
|
Constructor and Description |
---|
MockImplServiceWriter(ServiceContractModel model,
String directory,
String rootPackage,
String servKey,
List<ServiceMethod> methods,
boolean isR1) |
MockImplServiceWriter(ServiceContractModel model,
String directory,
String rootPackage,
String servKey,
List<ServiceMethod> methods,
boolean isR1,
String packageName,
String className) |
Modifier and Type | Method and Description |
---|---|
static String |
calcClassName(String servKey)
Given the service key (name), returns a calculated class name for the mock impl.
|
protected MockImplServiceWriter.MethodType |
calcMethodType(ServiceMethod method)
Analyses the method and returns a MethodType enum that describes what type of method this is.
|
protected String |
calcObjectName(ServiceMethod method) |
static String |
calcPackage(String servKey,
String rootPackage)
Returns the mock implementation package name.
|
static String |
calcServiceInterfaceClassName(String servKey) |
protected static String |
fixServKey(String servKey) |
protected String |
initLower(String str) |
void |
write()
Write out the entire file
|
closeBrace, getBody, getClassName, getDirectory, getFileName, getPackageName, getRootDirectory, importsAdd, indentPrintWrappedComment, openBrace, setPackageName, writeHeader, writeImports, writeJavaClassAndImportsOutToFile
decrementIndent, escapeXML, getIndent, getOut, incrementIndent, indent, indent, indentPrint, indentPrintln, print, println, setIndent, setOut, writeAttribute, writeComment, writeCommentBox, writeTag, writeTag
protected ServiceContractModel model
protected ModelFinder finder
protected String servKey
protected List<ServiceMethod> methods
public MockImplServiceWriter(ServiceContractModel model, String directory, String rootPackage, String servKey, List<ServiceMethod> methods, boolean isR1)
public MockImplServiceWriter(ServiceContractModel model, String directory, String rootPackage, String servKey, List<ServiceMethod> methods, boolean isR1, String packageName, String className)
public static String calcPackage(String servKey, String rootPackage)
servKey
- rootPackage
- protected static String fixServKey(String servKey)
public static String calcClassName(String servKey)
public static String calcServiceInterfaceClassName(String servKey)
protected MockImplServiceWriter.MethodType calcMethodType(ServiceMethod method)
public void write()
protected String calcObjectName(ServiceMethod method)
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.