Class ClassDef
- java.lang.Object
-
- io.github.danielnaczo.python3parser.model.stmts.Statement
-
- io.github.danielnaczo.python3parser.model.stmts.compoundStmts.ClassDef
-
-
Constructor Summary
Constructors Constructor Description ClassDef(Identifier name, Expression arguments, Statement body, java.util.List<Decorator> decoratorList)ClassDef(java.lang.String name)ClassDef(java.lang.String name, Expression arguments)ClassDef(java.lang.String name, Expression arguments, Statement body)ClassDef(java.lang.String name, Expression arguments, Statement body, java.util.List<Decorator> decoratorList)ClassDef(java.lang.String name, Statement body)ClassDef(java.lang.String name, Statement body, java.util.List<Decorator> decoratorList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,P>
Raccept(Python3ASTVisitor<R,P> visitor, P param)ClassDefaddClass(ClassDef clazz)DecoratoraddDecorator(Decorator decorator)FunctionDefaddFunction(FunctionDef function)StatementaddStatement(Statement statement)booleanequals(java.lang.Object o)java.util.Optional<Expression>getArguments()StatementgetBody()java.util.List<ClassDef>getClassDefs()java.util.List<Decorator>getDecoratorList()java.util.List<Decorator>getDecorators()java.util.List<FunctionDef>getFunctionDefs()IdentifiergetName()inthashCode()voidsetArguments(java.util.Optional<Expression> arguments)voidsetBody(Statement body)voidsetDecoratorList(java.util.List<Decorator> decoratorList)voidsetName(Identifier name)java.lang.StringtoString()
-
-
-
Constructor Detail
-
ClassDef
public ClassDef(java.lang.String name)
-
ClassDef
public ClassDef(java.lang.String name, Expression arguments)
-
ClassDef
public ClassDef(java.lang.String name, Statement body)
-
ClassDef
public ClassDef(java.lang.String name, Expression arguments, Statement body)
-
ClassDef
public ClassDef(java.lang.String name, Statement body, java.util.List<Decorator> decoratorList)
-
ClassDef
public ClassDef(java.lang.String name, Expression arguments, Statement body, java.util.List<Decorator> decoratorList)
-
ClassDef
public ClassDef(Identifier name, Expression arguments, Statement body, java.util.List<Decorator> decoratorList)
-
-
Method Detail
-
getName
public Identifier getName()
-
setName
public void setName(Identifier name)
-
getArguments
public java.util.Optional<Expression> getArguments()
-
setArguments
public void setArguments(java.util.Optional<Expression> arguments)
-
getBody
public Statement getBody()
-
setBody
public void setBody(Statement body)
-
getDecoratorList
public java.util.List<Decorator> getDecoratorList()
-
setDecoratorList
public void setDecoratorList(java.util.List<Decorator> decoratorList)
-
addFunction
public FunctionDef addFunction(FunctionDef function)
-
getClassDefs
public java.util.List<ClassDef> getClassDefs()
-
getFunctionDefs
public java.util.List<FunctionDef> getFunctionDefs()
-
getDecorators
public java.util.List<Decorator> getDecorators()
-
accept
public <R,P> R accept(Python3ASTVisitor<R,P> visitor, P param)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-