Package io.protostuff.compiler.model
Class Proto
- java.lang.Object
-
- io.protostuff.compiler.model.AbstractElement
-
- io.protostuff.compiler.model.AbstractDescriptor
-
- io.protostuff.compiler.model.AbstractUserTypeContainer
-
- io.protostuff.compiler.model.Proto
-
- All Implemented Interfaces:
Descriptor,Element,EnumContainer,ExtensionContainer,MessageContainer,UserTypeContainer
public class Proto extends AbstractUserTypeContainer implements UserTypeContainer
Proto node - represents a parse result for a proto file.- Author:
- Kostiantyn Shchepanovskyi
-
-
Field Summary
Fields Modifier and Type Field Description protected ProtoContextcontextprotected Stringfilenameprotected List<Import>importsprotected Modulemoduleprotected Packagepkgprotected List<Service>servicesprotected Syntaxsyntax-
Fields inherited from class io.protostuff.compiler.model.AbstractUserTypeContainer
declaredExtensions, enums, messages, parent
-
Fields inherited from class io.protostuff.compiler.model.AbstractDescriptor
name, options
-
Fields inherited from class io.protostuff.compiler.model.AbstractElement
comments, sourceCodeLocation
-
-
Constructor Summary
Constructors Constructor Description Proto()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddImport(Import anImport)voidaddService(Service service)StringgetCanonicalName()Get canonical name of this proto file.ProtoContextgetContext()DescriptorTypegetDescriptorType()StringgetFilename()Full filename (including path, relative to root of source tree).List<Import>getImports()ModulegetModule()StringgetNamespace()Returns string prefix that is common for all children full names.PackagegetPackage()List<Import>getPublicImports()Returns all public imports in this proto file.List<Service>getServices()SyntaxgetSyntax()voidsetContext(ProtoContext context)voidsetFilename(String filename)voidsetImports(List<Import> imports)voidsetModule(Module module)voidsetPackage(Package pkg)voidsetServices(List<Service> services)voidsetSyntax(Syntax syntax)StringtoString()-
Methods inherited from class io.protostuff.compiler.model.AbstractUserTypeContainer
addDeclaredExtension, addEnum, addMessage, getDeclaredExtensions, getEnums, getMessages, getParent, setEnums
-
Methods inherited from class io.protostuff.compiler.model.AbstractDescriptor
getName, getOptions, setName
-
Methods inherited from class io.protostuff.compiler.model.AbstractElement
addComment, getCommentLines, getComments, getSourceCodeLocation, setComments, setSourceCodeLocation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.protostuff.compiler.model.Descriptor
getName, getOptions
-
Methods inherited from interface io.protostuff.compiler.model.Element
getCommentLines, getComments, getParent, getSourceCodeLocation
-
Methods inherited from interface io.protostuff.compiler.model.EnumContainer
addEnum, getEnum, getEnums
-
Methods inherited from interface io.protostuff.compiler.model.ExtensionContainer
addDeclaredExtension, getDeclaredExtensions
-
Methods inherited from interface io.protostuff.compiler.model.MessageContainer
addMessage, getMessage, getMessages
-
-
-
-
Method Detail
-
getContext
public ProtoContext getContext()
-
setContext
public void setContext(ProtoContext context)
-
getDescriptorType
public DescriptorType getDescriptorType()
- Specified by:
getDescriptorTypein interfaceDescriptor
-
getFilename
public String getFilename()
Full filename (including path, relative to root of source tree).
-
setFilename
public void setFilename(String filename)
-
getSyntax
public Syntax getSyntax()
-
setSyntax
public void setSyntax(Syntax syntax)
-
getPackage
public Package getPackage()
-
setPackage
public void setPackage(Package pkg)
-
getPublicImports
public List<Import> getPublicImports()
Returns all public imports in this proto file.
-
addImport
public void addImport(Import anImport)
-
addService
public void addService(Service service)
-
getNamespace
public String getNamespace()
Description copied from interface:UserTypeContainerReturns string prefix that is common for all children full names. For root container it is a dot if package is not set.- Specified by:
getNamespacein interfaceUserTypeContainer
-
getCanonicalName
public String getCanonicalName()
Get canonical name of this proto file. Canonical name is composed as package and file name, separated by dot.
-
getModule
public Module getModule()
-
setModule
public void setModule(Module module)
-
-