input
stringlengths
10
828
output
stringlengths
5
107
public boolean is reporting returns return is reporting returns
checks whether non terminal elements are reported when returning
public boolean is returning return is returning
returns true if the current element is left
protected void reset program element root while count 0 stack count null stack count current root
reset the walker reusing existing objects
public void set parent filter model element filter filter parent filter filter
set a filter that decides whether the children of a non terminal
public boolean next class c while next if c is instance current return true return false
proceed to the next occurrance of an object of the given class or
public boolean next model element filter filter while next if filter accept current return true return false
proceed to the next occurrance of an object accepted by the given
public object clone try abstract tree walker here abstract tree walker super clone here stack program element stack clone return here catch clone not supported exception cnse return null
creates a new walker pointing to the same position as the current one
public void set listener astiterator listener l listener l
assigns a certain listener to the iterator
public void iterate program element pe if listener null recurse pe else simple recurse pe
performs a depth first search traversal through the given ast
protected void simple recurse program element pe if pe instanceof non terminal program element non terminal program element ntpe non terminal program element pe int child count ntpe get child count for int i 0 i child count i program element child ntpe get child at i simple recurse child
recurses through the given ast in depth first search order
protected void make services change history make change history project settings make project settings program factory make program factory source file repository make source file repository implicit element info make implicit element info name info make name info class file repository make class file repository source info make source info byte code info make byte code info constant evaluator make constant evaluator
called during service initialization constructs services
protected void init services throws initialization exception change history initialize this project settings initialize this program factory initialize this source file repository initialize this implicit element info initialize this name info initialize this class file repository initialize this source info initialize this byte code info initialize this constant evaluator initialize this
called during service initialization constructs services
public void initialize service configuration cfg if service configuration null service configuration cfg else debug asserta service configuration cfg a java program factory is a singleton and may be part of one and only one service configuration we appologize for the inconveniences project settings settings service configuration get project settings settings add property change listener this writer new string writer source printer new pretty printer writer settings get properties
called by the service configuration indicating that all services
public service configuration get service configuration return service configuration
returns the service configuration this service is a part of
public int get operator type return operator type
returns the operator type
public void set operator type int operator type this operator type operator type set identifier new identifier get operator name
sets the operator type
public string get operator symbol switch operator type case plus return case minus return case times return case divide return case modulo return case not return case binary not return case binary and return case binary or return case binary xor return case increment return case decrement return case true return true case false return false case shift left return case shift right return case equals return case not equals return case less than return case greater than return case less or equals return case greater or equals return return
returns the operators name e
public get accessor get get accessor return get block
returns the get block
public set accessor get set accessor return set block
returns the set block
public expression get expression at int index if initializer null index 0 return initializer throw new array index out of bounds exception
return the expression at the specified index in this nodes
public statement mutable list parse statements string in throws parser exception try return parse statements new string reader in catch ioexception ioe throw new parser exception ioe
parse a list of
public int get child count int result 0 if attr sections null result attr sections size if modifiers null result modifiers size if name null result if extending null result if implementing null result if members null result members size return result
returns the number of children of this node
public program element get child at int index int len if attr sections null len attr sections size if len index return attr sections get attribute section index index len if modifiers null len modifiers size if len index return modifiers get program element index index len if name null if index 0 return name index if extending null if index 0 return extending index if implementing null if index 0 return implementing index if members null return members get program element index throw new array index out of bounds exception
returns the child at the specified index in this nodes virtual
public statement container get statement container return parent instanceof statement container statement container parent null
get statement container
public void set statement container statement container p parent statement block p
set statement container
public extends get extended types return extending
get extended types
public implements get implemented types return implementing
get implemented types
public void set implemented types implements spec implementing spec
set implemented types
public pretty printer get pretty printer writer out return new pretty printer out service configuration get project settings get properties
returns a new suitable
public comment create comment return new comment
creates a new
public comment create comment string text return new comment text
creates a new
public comment create comment string text boolean prefixed return new comment text prefixed
creates a new
public compilation unit create compilation unit return new compilation unit
creates a new
public boolean is property like return has add accessor has remove accessor
returns true if the defined event is a property like event event with
public type get type return get enum get base type
enum members report their parents type as their type
public class type get containing class type system err println warning calling get containing class type on an enum member returns null return null
enum members are not contained in a class type
public xml doc comment create xml doc comment return new xml doc comment
creates a new
public void set body statement block body
dont ever think about setting the body
public void set special constructor reference statement st special constructor reference st make parent role valid
sets the special constructor reference
public statement get special constructor reference return special constructor reference
returns the special constructor reference
public xml doc comment create xml doc comment string text return new xml doc comment text
creates a new
public identifier create identifier return new identifier
creates a new
public identifier create identifier string text return new identifier text
creates a new
public using create using return new using
creates a new
public int get type reference count return base null 0 1
get the number of type references in this container
public using create using type reference t boolean multi return new using t multi
creates a new
public type declaration get member parent if parent instanceof type declaration return type declaration parent else return null
get member parent
public void set member parent type declaration p parent p
set member parent
public non terminal program element get astparent return parent
get ast parent
public using create using namespace reference t return new using t
creates a new
public boolean is public return get astparent instanceof interface declaration super is public
test whether the declaration is public
public boolean is static return get astparent instanceof interface declaration super is static
test whether the declaration is static
public void set extended types extends spec extending spec
set extended types
public namespace specification create namespace specification return new namespace specification
creates a new
public attribute section list get attribute sections return attr sections
method get attribute sections
public namespace specification create namespace specification namespace reference pkg return new namespace specification pkg
creates a new
public int get type declaration count int count 0 if members null for int i members size 1 i 0 i 1 if members get member declaration i instanceof type declaration count 1 return count
get the number of type declarations in this container
public single line comment create single line comment return new single line comment
creates a new
public expression get case expression return case expression
returns the case expression
public void set case expression expression case expression this case expression case expression make parent role valid
sets the case expression
public single line comment create single line comment string text return new single line comment text
creates a new
public int get expression count if case expression null return 1 else return 0
get the number of expressions in this container
public type reference create type reference return new type reference
creates a new
public type reference create type reference identifier name return new type reference name
creates a new
public local variable declaration get local variable declaration return variable
returns the variable
public void set local variable declaration local variable declaration variable this variable variable
sets the variable
public type reference create type reference reference prefix prefix identifier name return new type reference prefix name
creates a new
public type reference create type reference identifier name int dim return new type reference name dim
creates a new
public string get name variable specification list vsal get lvd get variables return vsal get variable specification 0 get name
returns the identifier
public namespace reference create namespace reference return new namespace reference
creates a new
public namespace reference create namespace reference identifier id return new namespace reference id
creates a new
public uncollated reference qualifier create uncollated reference qualifier return new uncollated reference qualifier
creates a new
public int get child count int result 0 if condition null result if message null result return result
returns the number of children of this node
public boolean replace child program element p program element q if p null throw new null pointer exception if condition p expression r expression q condition r if r null r set expression container this return true if message p expression r expression q message r if r null r set expression container this return true return false
replace a single child in the current node
public int get expression count int c 0 if condition null c if message null c return c
get the number of expressions in this container
public expression get condition return condition
gets the condition expression
public void set condition expression expr condition expr
sets the condition expression
public expression get message return message
gets the message expression
public void set message expression expr message expr
sets the message expression
public uncollated reference qualifier create uncollated reference qualifier identifier id return new uncollated reference qualifier id
creates a new
public class declaration create class declaration return new class declaration
creates a new
public void set parent non terminal program element parent this parent parent
sets the parent
public void set target attribute target target debug asserta target instanceof global attribute target super set target target
sets the target
public class declaration create class declaration member declaration mutable list members return new class declaration members
creates a new
public void set attributes attribute mutable list sections this attributes sections
sets the attributes
public attributable element get parent return parent
returns the parent
public void set parent attributable element parent this parent parent
sets the parent
public attribute container get parent return parent
returns the parent
public attribute target get target return target
returns the target
public void set parent attribute container parent this parent parent
sets the parent
public void set target attribute target target this target target
sets the target
public attribute list get attributes return attributes
method get attributes
public void set arguments attribute argument mutable list params this arguments params
sets the arguments
public void set type reference type reference ref this ref ref
sets the ref
public attribute argument list get attribute arguments return arguments
method get attribute arguments
public struct declaration create struct declaration return new struct declaration
creates a new
public attribute argument container get parent return parent
returns the parent
public void set parent attribute parent this parent parent
sets the parent
public boolean is multi import return is multi import
checks if this import is a multi type import also known as
public void set multi import boolean multi if multi reference instanceof namespace reference throw new illegal argument exception namespace imports are always multi is multi import multi
sets this import to be a multi type import