Package de.spraener.nxtgen.target
Interface CodeSection
- All Known Implementing Classes:
AbstractCodeSection,JavaImplementsCodeSection,SimpleCodeSection,UniqueLineSection
public interface CodeSection
-
Method Summary
Modifier and TypeMethodDescriptionadd(CodeSnippet snippet) add(Object aspect, ModelElement me, String code) getFirstSnippetForAspect(Object aspect) getLastSnippetForAspect(Object aspect) getSnippetsForAspect(Object aspect) insertAfter(CodeSnippet snippet, CodeSnippet snippetToInsert) insertBefore(CodeSnippet snippet, CodeSnippet snippetToInsert) replace(CodeSnippet snippet, CodeSnippet snippetToInsert) DANGER!
-
Method Details
-
getSnippetsForAspect
-
getLastSnippetForAspect
-
getFirstSnippetForAspect
-
getSnippetsForAspectAndModelElement
-
getFirstSnippetForAspectAndModelElement
-
getLastSnippetForAspectAndModelElement
-
add
-
add
-
add
-
insertBefore
-
insertAfter
-
replace
DANGER! This replace-method will REPLACE! the snippet with the snippetToInsert. Only use this method when you are really sure to do so. The aspect of the snippetToInsert will be overwritten with the aspect of the replaced snippet. USE WITH CARE!- Parameters:
snippet- the snippet to be replaced and to take the aspect fromsnippetToInsert- the snippet to replace the old snippet and get the aspect from the old snippet.- Returns:
- the CodeSection with replaced snippet.
-
getSnippetsOrdered
Collection<CodeSnippet> getSnippetsOrdered()
-