org.mybatis.generator.api.dom.java
Class Method

java.lang.Object
  extended by org.mybatis.generator.api.dom.java.JavaElement
      extended by org.mybatis.generator.api.dom.java.Method

public class Method
extends JavaElement

Author:
Jeff Butler

Constructor Summary
Method()
           
Method(Method original)
          Copy constructor.
Method(String name)
           
 
Method Summary
 void addBodyLine(int index, String line)
           
 void addBodyLine(String line)
           
 void addBodyLines(Collection<String> lines)
           
 void addBodyLines(int index, Collection<String> lines)
           
 void addException(FullyQualifiedJavaType exception)
           
 void addParameter(int index, Parameter parameter)
           
 void addParameter(Parameter parameter)
           
 List<String> getBodyLines()
           
 List<FullyQualifiedJavaType> getExceptions()
           
 String getFormattedContent(int indentLevel, boolean interfaceMethod)
           
 String getName()
           
 List<Parameter> getParameters()
           
 FullyQualifiedJavaType getReturnType()
           
 boolean isConstructor()
           
 boolean isNative()
           
 boolean isSynchronized()
           
 void setConstructor(boolean constructor)
           
 void setName(String name)
           
 void setNative(boolean isNative)
           
 void setReturnType(FullyQualifiedJavaType returnType)
           
 void setSynchronized(boolean isSynchronized)
           
 
Methods inherited from class org.mybatis.generator.api.dom.java.JavaElement
addAnnotation, addFormattedAnnotations, addFormattedJavadoc, addJavaDocLine, addSuppressTypeWarningsAnnotation, getAnnotations, getJavaDocLines, getVisibility, isFinal, isStatic, setFinal, setStatic, setVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Method

public Method()

Method

public Method(String name)

Method

public Method(Method original)
Copy constructor. Not a truly deep copy, but close enough for most purposes.

Parameters:
original -
Method Detail

getBodyLines

public List<String> getBodyLines()
Returns:
Returns the bodyLines.

addBodyLine

public void addBodyLine(String line)

addBodyLine

public void addBodyLine(int index,
                        String line)

addBodyLines

public void addBodyLines(Collection<String> lines)

addBodyLines

public void addBodyLines(int index,
                         Collection<String> lines)

getFormattedContent

public String getFormattedContent(int indentLevel,
                                  boolean interfaceMethod)

isConstructor

public boolean isConstructor()
Returns:
Returns the constructor.

setConstructor

public void setConstructor(boolean constructor)
Parameters:
constructor - The constructor to set.

getName

public String getName()
Returns:
Returns the name.

setName

public void setName(String name)
Parameters:
name - The name to set.

getParameters

public List<Parameter> getParameters()

addParameter

public void addParameter(Parameter parameter)

addParameter

public void addParameter(int index,
                         Parameter parameter)

getReturnType

public FullyQualifiedJavaType getReturnType()
Returns:
Returns the returnType.

setReturnType

public void setReturnType(FullyQualifiedJavaType returnType)
Parameters:
returnType - The returnType to set.

getExceptions

public List<FullyQualifiedJavaType> getExceptions()
Returns:
Returns the exceptions.

addException

public void addException(FullyQualifiedJavaType exception)

isSynchronized

public boolean isSynchronized()

setSynchronized

public void setSynchronized(boolean isSynchronized)

isNative

public boolean isNative()

setNative

public void setNative(boolean isNative)


Copyright © 2010-2012 MyBatis.org. All Rights Reserved.