Class ProtoTypeMetadata
- java.lang.Object
-
- org.infinispan.protostream.annotations.impl.ProtoTypeMetadata
-
- All Implemented Interfaces:
HasProtoSchema
- Direct Known Subclasses:
ImportedProtoTypeMetadata
,ProtoEnumTypeMetadata
,ProtoMessageTypeMetadata
public abstract class ProtoTypeMetadata extends Object implements HasProtoSchema
- Since:
- 3.0
- Author:
- [email protected]
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ProtoTypeMetadata(String name, XClass javaClass)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static void
appendDocumentation(IndentWriter iw, String documentation)
void
generateProto(IndentWriter iw)
XClass
getAnnotatedClass()
At this level we pretend the Java class and the annotated class are one and the same, but subclasses may decide otherwise.String
getAnnotatedClassName()
String
getDocumentation()
abstract ProtoEnumValueMetadata
getEnumMemberByName(String name)
This is only for enums.String
getFileName()
The schema file where this type comes from.String
getFullName()
XClass
getJavaClass()
String
getJavaClassName()
String
getName()
ProtoMessageTypeMetadata
getOuterType()
String
getProtoDocs()
Integer
getProtoTypeId()
boolean
isAdapter()
abstract boolean
isEnum()
boolean
isImported()
Indicates if this type comes from the currently processed/generated schema of from an external schema.void
scanMemberAnnotations()
protected void
setOuterType(ProtoMessageTypeMetadata outerType)
protected void
validateName()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.protostream.annotations.impl.HasProtoSchema
toProtoSchema
-
-
-
-
Field Detail
-
name
protected final String name
-
javaClass
protected final XClass javaClass
The marshalled Java class.
-
outerType
protected ProtoMessageTypeMetadata outerType
-
-
Method Detail
-
validateName
protected void validateName()
-
getName
public String getName()
-
getFullName
public String getFullName()
-
getDocumentation
public String getDocumentation()
-
getProtoDocs
public String getProtoDocs()
-
getProtoTypeId
public Integer getProtoTypeId()
-
getJavaClass
public XClass getJavaClass()
-
getJavaClassName
public String getJavaClassName()
-
getAnnotatedClass
public XClass getAnnotatedClass()
At this level we pretend the Java class and the annotated class are one and the same, but subclasses may decide otherwise.
-
getAnnotatedClassName
public String getAnnotatedClassName()
-
isAdapter
public boolean isAdapter()
-
isImported
public boolean isImported()
Indicates if this type comes from the currently processed/generated schema of from an external schema.
-
getFileName
public String getFileName()
The schema file where this type comes from. Must be non-null for all imported types, can be null for others.
-
isEnum
public abstract boolean isEnum()
-
getEnumMemberByName
public abstract ProtoEnumValueMetadata getEnumMemberByName(String name)
This is only for enums.
-
getOuterType
public final ProtoMessageTypeMetadata getOuterType()
-
setOuterType
protected final void setOuterType(ProtoMessageTypeMetadata outerType)
-
generateProto
public void generateProto(IndentWriter iw)
- Specified by:
generateProto
in interfaceHasProtoSchema
-
scanMemberAnnotations
public void scanMemberAnnotations()
-
appendDocumentation
protected static void appendDocumentation(IndentWriter iw, String documentation)
-
-