Get the state for the component.

@param  c the component.

@return the state for the component.
165841
private int getComponentState(JComponent c) {
        if (frame != null) {

            if (frame.isSelected()) {
                return SELECTED;
            }
        }

        return SeaGlassLookAndFeel.getComponentState(c);
    }
541615
public CharacterComponent getComponent (int componentId)
        throws NoSuchComponentException
    {
        CharacterComponent component = _components.get(componentId);
        if (component == null) {
            throw new NoSuchComponentException(componentId);
        }
        return component;
    }
1228268
public int getState()
   {
      boolean hasSuspendedComponents = false;
      boolean hasResumedComponents = false;
      List<Suspendable> suspendableComponents = getComponentInstancesOfType(Suspendable.class);
      for (Suspendable component : suspendableComponents)
      {
         if (component.isSuspended())
         {
            hasSuspendedComponents = true;
         }
         else
         {
            hasResumedComponents = true;
         }
      }

      if (hasSuspendedComponents && !hasResumedComponents)
      {
         return ManageableRepository.SUSPENDED;
      }
      else if (!hasSuspendedComponents)
      {
         return ManageableRepository.ONLINE;
      }
      else
      {
         return ManageableRepository.UNDEFINED;
      }
   }
94630
private int getThreadState( Thread.State state ) {
		
		Thread[] threads = getAllThreads();
		int ct = 0;
		
		for( Thread thread : threads ) {
			if (state.equals(thread.getState()) )
				ct++;
		}
		
		return ct;
		
	}
285157
protected SegmentType getSegmentType(JComponent c) {
        SegmentType segmentType = SegmentType.NONE;

        String position = (String) c.getClientProperty("JTabbedPane.Tab.segmentPosition");

        if ("first".equals(position)) {
            segmentType = SegmentType.FIRST;
        } else if ("middle".equals(position)) {
            segmentType = SegmentType.MIDDLE;
        } else if ("last".equals(position)) {
            segmentType = SegmentType.LAST;
        }

        return segmentType;
    }
1023032
public static String getDescriptor(final Class c) {
        StringBuffer buf = new StringBuffer();
        getDescriptor(buf, c);
        return buf.toString();
    }
819515
public boolean getState()
    {
        boolean returnValue = true;
        if (m_objTarget instanceof String)
        {
            String fieldString = this.getString();
            returnValue = m_objTarget.equals(fieldString); // True if == target value
        }
        else
        {
            Object fieldString = this.getData();
            returnValue = m_objTarget.equals(fieldString); // True if == target value
        }
        if (m_bTrueIfMatch)
            return returnValue;
        else
            return !returnValue;
    }
576464
protected <S extends State> S getPartitionedState(StateDescriptor<S, ?> stateDescriptor) throws Exception {
		return getPartitionedState(VoidNamespace.INSTANCE, VoidNamespaceSerializer.INSTANCE, stateDescriptor);
	}
1187939
public static String getDescriptor(final Class<?> c) {
		StringBuilder sb = new StringBuilder();
        getDescriptor(sb, c);
        return sb.toString();
    }
1114129
public State state() {
    if (selectionsIterator == null) {
      return State.RESET;
    } else if (hasNext()) {
      return State.ITERATE;
    } else {
      return State.COMPLETE;
    }
  }
404608
public static ClassLoader getClassLoader(final Class<?> c)
   {
      if (System.getSecurityManager() == null)
         return c.getClassLoader();

      return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
      {
         public ClassLoader run()
         {
            return c.getClassLoader();
         }
      });
   }
662054
@Override
    public ButtonState getState() {
        if(pin.isState(pressedState))
            return ButtonState.PRESSED;
        else
            return ButtonState.RELEASED;
    }
1125138
private SeaGlassContext getContext(JComponent c, Region subregion, int state) {
        SynthStyle style = null;
        Class      klass = SeaGlassContext.class;

        if (subregion == Region.TABBED_PANE_TAB) {
            style = tabStyle;
        } else if (subregion == Region.TABBED_PANE_TAB_AREA) {
            style = tabAreaStyle;
        } else if (subregion == Region.TABBED_PANE_CONTENT) {
            style = tabContentStyle;
        } else if (subregion == SeaGlassRegion.TABBED_PANE_TAB_CLOSE_BUTTON) {
            style = tabCloseStyle;
        }

        return SeaGlassContext.getContext(klass, c, subregion, style, state);
    }
561068
public static State getStateImpl() {
        State s = null;
        try {
             DiscoverClass dc = new DiscoverClass();
             s = (State) dc.newInstance(
             State.class,
             State.DEFAULT_STATE_IMPL);
        } catch (Exception ex) {
             // ignore as default implementation will be used.
        }
        return s;
    }
543800
public CmsResourceState getMovedState() {

        if (!m_isMoved) {
            return getState();
        } else if (getState().isDeleted()) {
            return STATE_MOVED_SOURCE;
        } else if (getState().isNew()) {
            return STATE_MOVED_DESTINATION;
        } else {
            // should never happen
            return getState();
        }
    }
1048406
public TrieNode getContinuation(char c) {
    return ((Optional<TrieNode>) getChild(c)).orElseGet(() -> {
      TrieNode godparent = godparent();
      if (null == godparent) return null;
      return godparent.getContinuation(c);
    });
  }
23668
def get_state(cls, clz):
        
        if clz not in cls.__shared_state:
            cls.__shared_state[clz] = (
                clz.init_state() if hasattr(clz, "init_state") else {}
            )
        return cls.__shared_state[clz]