public class ProtoFile extends ProtoContainerElement
| Modifier and Type | Method and Description |
|---|---|
static ProtoFile |
create(Model model,
com.google.protobuf.DescriptorProtos.FileDescriptorProto proto,
boolean isSource,
ExtensionPool extensionPool)
Creates a new protocol file backed up by the given descriptor.
|
com.google.common.collect.ImmutableList<ProtoFile> |
getDependencies()
Returns the dependencies.
|
java.lang.String |
getDocumentation(ProtoElement element)
Helper to get the documentation backed up by this proto file for the given
element.
|
ProtoFile |
getFile()
Returns the proto file in which this element lives.
|
java.lang.String |
getFullName()
Returns the full name of this element, including package and outer messages
for nested elements.
|
com.google.common.collect.ImmutableList<Interface> |
getInterfaces()
Returns the interfaces in this file.
|
Location |
getLocation()
Deliver the location of this protocol element.
|
Model |
getModel()
Returns the model.
|
java.util.Map<com.google.protobuf.Descriptors.FieldDescriptor,java.lang.Object> |
getOptionFields()
Return this element's options from the proto.
|
com.google.protobuf.DescriptorProtos.FileDescriptorProto |
getProto()
Returns the file descriptor proto.
|
java.lang.Iterable<Interface> |
getReachableInterfaces()
Returns the interfaces reachable with active scoper.
|
com.google.protobuf.Syntax |
getSyntax()
Gets the syntax in which the element was defined.
|
boolean |
isDeprecated()
Returns true if this object represents something that is configured as deprecated.
|
boolean |
isSource()
Returns true if this file is a proper source, in contrast to a dependency.
|
java.lang.String |
toString() |
buildChildren, getEnums, getMessagesgetParent, getSimpleName, isReachableaddAttribute, getAttribute, getAttributeOrDefault, hasAttribute, putAttribute, removeAttributepublic static ProtoFile create(Model model, com.google.protobuf.DescriptorProtos.FileDescriptorProto proto, boolean isSource, ExtensionPool extensionPool)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isDeprecated()
isDeprecated in class ProtoElementpublic boolean isSource()
public Model getModel()
ProtoElementgetModel in class ProtoElementpublic java.lang.String getFullName()
ProtoElementgetFullName in class ProtoElementpublic ProtoFile getFile()
ProtoElementgetFile in class ProtoElementpublic Location getLocation()
ProtoElementgetLocation in class ProtoElementpublic com.google.protobuf.DescriptorProtos.FileDescriptorProto getProto()
public java.util.Map<com.google.protobuf.Descriptors.FieldDescriptor,java.lang.Object> getOptionFields()
ProtoElementgetOptionFields in class ProtoElementpublic com.google.common.collect.ImmutableList<ProtoFile> getDependencies()
public com.google.common.collect.ImmutableList<Interface> getInterfaces()
public java.lang.Iterable<Interface> getReachableInterfaces()
public java.lang.String getDocumentation(ProtoElement element)
public com.google.protobuf.Syntax getSyntax()
ProtoElementgetSyntax in class ProtoElement