code: public boolean attachComponent(GVRComponent component) {
          if (component.getNative() != 0) {
              NativeSceneObject.attachComponent(getNative(), component.getNative());
          }
          synchronized (mComponents) {
              long type = component.getType();
              if (!mComponents.containsKey(type)) {
                  mComponents.put(type, component);
                  component.setOwnerObject(this);
                  return true;
              }
          }
          return false;
      }
docs: Attach a component to this scene object.
  
  Each scene object has a list of components that may
  be attached to it. Only one component of a particular type
  can be attached. Components are retrieved based on their type.
  
  @return true if component is attached, false if a component of that class is already attached.
  @param component component to attach.
  @see GVRSceneObject#detachComponent(long)
  @see GVRSceneObject#getComponent(long)