de.ispsoft.jaxme.generator.javasource
Class JavaInnerClass

java.lang.Object
  extended byde.ispsoft.jaxme.generator.javasource.JavaSource
      extended byde.ispsoft.jaxme.generator.javasource.JavaInnerClass

public class JavaInnerClass
extends JavaSource

Implements an inner class.

Author:
Jochen Wiedmann

Constructor Summary
JavaInnerClass(java.lang.String pName)
          Creates a new JavaInnerClass with default protection
JavaInnerClass(java.lang.String pName, java.lang.String pProtection)
          Creates a new JavaInnerClass with the given protection.
 
Method Summary
 void addImport(java.lang.String s)
          Throws an exception, as inner classes don't have import statements.
 boolean getStatic()
          Returns whether this inner class is static.
 void setPackage(java.lang.String pPackage)
          Throws an Exception, as inner classes don't have a package.
 void setStatic(boolean pStatic)
          Sets whether this inner class is static.
 void setType(java.lang.String type)
          Throws an exception, as inner classes must not be interfaces.
 java.lang.String toString()
          Same as JavaSource.toString(), but indents lines by two characters.
 
Methods inherited from class de.ispsoft.jaxme.generator.javasource.JavaSource
addConstructor, addField, addImplements, addInnerClass, addMethod, addRawJavaSource, clearInnerClasses, clearRawJavaSources, getComment, getConstructors, getExtends, getFields, getImplements, getImport, getInnerClasses, getMethods, getName, getPackage, getProtection, getQName, getQuoted, getQuotedNoQuotes, getRawJavaSources, getType, isAbstract, setAbstract, setComment, setExtends, setName, setProtection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaInnerClass

public JavaInnerClass(java.lang.String pName)
Creates a new JavaInnerClass with default protection

Parameters:
pName - The class or interface name

JavaInnerClass

public JavaInnerClass(java.lang.String pName,
                      java.lang.String pProtection)

Creates a new JavaInnerClass with the given protection.

Parameters:
pName - The class or interface name
pProtection - null, "public", "protected" or "private"
Method Detail

setPackage

public void setPackage(java.lang.String pPackage)

Throws an Exception, as inner classes don't have a package.

Overrides:
setPackage in class JavaSource
See Also:
JavaSource.getPackage()

setType

public void setType(java.lang.String type)

Throws an exception, as inner classes must not be interfaces.

Overrides:
setType in class JavaSource
Parameters:
type - "class" or "interface"
See Also:
JavaSource.getType()

addImport

public void addImport(java.lang.String s)

Throws an exception, as inner classes don't have import statements.

Overrides:
addImport in class JavaSource
See Also:
JavaSource.addImport(java.lang.String)

toString

public java.lang.String toString()

Same as JavaSource.toString(), but indents lines by two characters.

Overrides:
toString in class JavaSource

getStatic

public boolean getStatic()

Returns whether this inner class is static.

Overrides:
getStatic in class JavaSource

setStatic

public void setStatic(boolean pStatic)

Sets whether this inner class is static.

Overrides:
setStatic in class JavaSource