org.duelengine.duel.codedom
Class CodeTypeDeclaration

java.lang.Object
  extended by org.duelengine.duel.codedom.CodeObject
      extended by org.duelengine.duel.codedom.CodeMember
          extended by org.duelengine.duel.codedom.CodeTypeDeclaration
All Implemented Interfaces:
IdentifierScope

public class CodeTypeDeclaration
extends CodeMember
implements IdentifierScope

Represents a class definition


Constructor Summary
CodeTypeDeclaration()
           
CodeTypeDeclaration(AccessModifierType access, String typeNS, String typeName, Class<?> baseType, CodeMember... members)
           
 
Method Summary
 void add(CodeMember member)
           
 void addAll(Collection<? extends CodeMember> members)
           
 boolean equals(Object arg)
           
 AccessModifierType getAccess()
           
 Class<?> getBaseType()
           
 List<CodeMember> getMembers()
          Contains the output methods.
 String getNamespace()
           
 String getTypeName()
           
 int hashCode()
           
 boolean isLocalIdent(String ident)
          Determines if the client ident is declared in local scope
 String nextIdent(String prefix)
          Gets a new unique ident with the given prefix
 void setAccess(AccessModifierType value)
           
 void setBaseType(Class<?> value)
           
 void setNamespace(String value)
           
 void setTypeName(String value)
           
 String uniqueIdent(String ident)
          Gets the corresponding unique server ident for the client ident
 void visit(CodeVisitor visitor)
           
 
Methods inherited from class org.duelengine.duel.codedom.CodeMember
getName, setName, withUserData
 
Methods inherited from class org.duelengine.duel.codedom.CodeObject
getUserData, putUserData, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CodeTypeDeclaration

public CodeTypeDeclaration()

CodeTypeDeclaration

public CodeTypeDeclaration(AccessModifierType access,
                           String typeNS,
                           String typeName,
                           Class<?> baseType,
                           CodeMember... members)
Method Detail

getAccess

public AccessModifierType getAccess()
Overrides:
getAccess in class CodeMember

setAccess

public void setAccess(AccessModifierType value)
Overrides:
setAccess in class CodeMember

getBaseType

public Class<?> getBaseType()

setBaseType

public void setBaseType(Class<?> value)

setTypeName

public void setTypeName(String value)

getTypeName

public String getTypeName()

setNamespace

public void setNamespace(String value)

getNamespace

public String getNamespace()

getMembers

public List<CodeMember> getMembers()
Contains the output methods. The first one is the entry point.

Returns:

add

public void add(CodeMember member)

addAll

public void addAll(Collection<? extends CodeMember> members)

isLocalIdent

public boolean isLocalIdent(String ident)
Description copied from interface: IdentifierScope
Determines if the client ident is declared in local scope

Specified by:
isLocalIdent in interface IdentifierScope
Returns:

uniqueIdent

public String uniqueIdent(String ident)
Description copied from interface: IdentifierScope
Gets the corresponding unique server ident for the client ident

Specified by:
uniqueIdent in interface IdentifierScope
Returns:

nextIdent

public String nextIdent(String prefix)
Description copied from interface: IdentifierScope
Gets a new unique ident with the given prefix

Specified by:
nextIdent in interface IdentifierScope
Returns:

visit

public void visit(CodeVisitor visitor)
Overrides:
visit in class CodeObject

equals

public boolean equals(Object arg)
Overrides:
equals in class CodeMember

hashCode

public int hashCode()
Overrides:
hashCode in class CodeMember


Copyright © 2012. All Rights Reserved.