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:
- anistor@redhat.com
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedProtoTypeMetadata(String name, XClass javaClass)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static voidappendDocumentation(IndentWriter iw, String documentation)voidgenerateProto(IndentWriter iw)XClassgetAnnotatedClass()At this level we pretend the Java class and the annotated class are one and the same, but subclasses may decide otherwise.StringgetAnnotatedClassName()StringgetDocumentation()abstract ProtoEnumValueMetadatagetEnumMemberByName(String name)This is only for enums.StringgetFileName()The schema file where this type comes from.StringgetFullName()XClassgetJavaClass()StringgetJavaClassName()StringgetName()ProtoMessageTypeMetadatagetOuterType()StringgetProtoDocs()IntegergetProtoTypeId()booleanisAdapter()abstract booleanisEnum()booleanisImported()Indicates if this type comes from the currently processed/generated schema of from an external schema.voidscanMemberAnnotations()protected voidsetOuterType(ProtoMessageTypeMetadata outerType)protected voidvalidateName()-
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:
generateProtoin interfaceHasProtoSchema
-
scanMemberAnnotations
public void scanMemberAnnotations()
-
appendDocumentation
protected static void appendDocumentation(IndentWriter iw, String documentation)
-
-