Class ProtoEnumTypeMetadata
- java.lang.Object
-
- org.infinispan.protostream.annotations.impl.ProtoTypeMetadata
-
- org.infinispan.protostream.annotations.impl.ProtoEnumTypeMetadata
-
- All Implemented Interfaces:
HasProtoSchema
public final class ProtoEnumTypeMetadata extends ProtoTypeMetadata
AProtoTypeMetadatafor an enum type created based on annotations during the current execution ofProtoSchemaBuilder.- Since:
- 3.0
- Author:
- anistor@redhat.com
-
-
Field Summary
-
Fields inherited from class org.infinispan.protostream.annotations.impl.ProtoTypeMetadata
javaClass, name, outerType
-
-
Constructor Summary
Constructors Constructor Description ProtoEnumTypeMetadata(XClass annotatedEnumClass, XClass enumClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.ProtoEnumValueMetadatagetEnumMemberByName(String name)This is only for enums.SortedMap<Integer,ProtoEnumValueMetadata>getMembers()booleanisAdapter()booleanisEnum()voidscanMemberAnnotations()StringtoString()-
Methods inherited from class org.infinispan.protostream.annotations.impl.ProtoTypeMetadata
appendDocumentation, getAnnotatedClassName, getDocumentation, getFileName, getFullName, getJavaClass, getJavaClassName, getName, getOuterType, getProtoDocs, getProtoTypeId, isImported, setOuterType, validateName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.protostream.annotations.impl.HasProtoSchema
toProtoSchema
-
-
-
-
Method Detail
-
getAnnotatedClass
public XClass getAnnotatedClass()
Description copied from class:ProtoTypeMetadataAt this level we pretend the Java class and the annotated class are one and the same, but subclasses may decide otherwise.- Overrides:
getAnnotatedClassin classProtoTypeMetadata
-
isAdapter
public boolean isAdapter()
- Overrides:
isAdapterin classProtoTypeMetadata
-
scanMemberAnnotations
public void scanMemberAnnotations()
- Overrides:
scanMemberAnnotationsin classProtoTypeMetadata
-
getMembers
public SortedMap<Integer,ProtoEnumValueMetadata> getMembers()
-
isEnum
public boolean isEnum()
- Specified by:
isEnumin classProtoTypeMetadata
-
getEnumMemberByName
public ProtoEnumValueMetadata getEnumMemberByName(String name)
Description copied from class:ProtoTypeMetadataThis is only for enums.- Specified by:
getEnumMemberByNamein classProtoTypeMetadata
-
generateProto
public void generateProto(IndentWriter iw)
- Specified by:
generateProtoin interfaceHasProtoSchema- Overrides:
generateProtoin classProtoTypeMetadata
-
-