Class SerializableField


  • public final class SerializableField
    extends java.lang.Object
    Reflection information about a field on a serializable class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.reflect.Field field  
      private Kind kind  
      private java.lang.String name  
      private java.lang.Class<?> type  
      private boolean unshared  
    • Constructor Summary

      Constructors 
      Constructor Description
      SerializableField​(java.lang.Class<?> type, java.lang.String name, boolean unshared)  
      SerializableField​(java.lang.Class<?> type, java.lang.String name, boolean unshared, java.lang.reflect.Field field)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.reflect.Field getField()
      Get the reflection Field for this serializable field.
      Kind getKind()
      Get the kind of field.
      java.lang.String getName()
      Get the name of the field.
      java.lang.Class<?> getType()
      Get the field type.
      boolean isUnshared()
      Determine whether this field is marked as "unshared".
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • type

        private final java.lang.Class<?> type
      • field

        private final java.lang.reflect.Field field
      • name

        private final java.lang.String name
      • unshared

        private final boolean unshared
      • kind

        private final Kind kind
    • Constructor Detail

      • SerializableField

        public SerializableField​(java.lang.Class<?> type,
                                 java.lang.String name,
                                 boolean unshared)
      • SerializableField

        SerializableField​(java.lang.Class<?> type,
                          java.lang.String name,
                          boolean unshared,
                          java.lang.reflect.Field field)
    • Method Detail

      • getField

        public java.lang.reflect.Field getField()
        Get the reflection Field for this serializable field. The resultant field will be accessible.
        Returns:
        the reflection field
      • getName

        public java.lang.String getName()
        Get the name of the field.
        Returns:
        the name
      • isUnshared

        public boolean isUnshared()
        Determine whether this field is marked as "unshared".
        Returns:
        true if the field is unshared
      • getKind

        public Kind getKind()
        Get the kind of field.
        Returns:
        the kind
      • getType

        public java.lang.Class<?> getType()
                                   throws java.lang.ClassNotFoundException
        Get the field type.
        Returns:
        the field type
        Throws:
        java.lang.ClassNotFoundException