Module JNISpice
Package spice.basic

Class KernelVarDescriptor


  • public class KernelVarDescriptor
    extends java.lang.Object
    Class KernelVarDescriptor packages attributes of kernel variables.

    Version 1.0.0 03-DEC-2009 (NJB)

    • Method Summary

      Modifier and Type Method Description
      boolean exists()
      Return a boolean indicating whether a specified kernel variable exists (is present in the kernel pool).
      int getDataType()
      Return the data type of the kernel variable, if any, associated with this instance.This method throws an exception of the variable does not exist.
      java.lang.String getName()
      Return the name of the kernel variable associated with this instance.The variable need not exist in the kernel pool.
      int getSize()
      Return the size of the kernel variable, if any, associated with this instance.This method throws an exception of the variable does not exist.
      • Methods inherited from class java.lang.Object

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

      • CSPICE_CHARACTER

        public static final java.lang.String CSPICE_CHARACTER
        See Also:
        Constant Field Values
      • exists

        private boolean exists
      • name

        private java.lang.String name
      • size

        private int size
      • dataType

        private int dataType
    • Constructor Detail

      • KernelVarDescriptor

        public KernelVarDescriptor()
        Zero-arguments constructor.
      • KernelVarDescriptor

        public KernelVarDescriptor​(KernelVarDescriptor descr)
        Copy constructor.
        Parameters:
        descr - KernelVarDescriptor
      • KernelVarDescriptor

        public KernelVarDescriptor​(boolean exists,
                                   java.lang.String name,
                                   int size,
                                   int dataType)
        Construct a descriptor from a kernel variable's attributes.
        Parameters:
        exists - boolean
        dataType - int
        name - String
        size - int
    • Method Detail

      • exists

        public boolean exists()
        Return a boolean indicating whether a specified kernel variable exists (is present in the kernel pool).

        User applications should call this method to determine whether the variable's size and data type can be fetched.

        Returns:
        boolean
      • getName

        public java.lang.String getName()
        Return the name of the kernel variable associated with this instance.The variable need not exist in the kernel pool.
        Returns:
        String
      • getSize

        public int getSize()
                    throws KernelVarNotFoundException
        Return the size of the kernel variable, if any, associated with this instance.This method throws an exception of the variable does not exist.
        Returns:
        int
        Throws:
        KernelVarNotFoundException - exception
      • getDataType

        public int getDataType()
                        throws KernelVarNotFoundException
        Return the data type of the kernel variable, if any, associated with this instance.This method throws an exception of the variable does not exist.
        Returns:
        int
        Throws:
        KernelVarNotFoundException - exception