org.omg.CORBA.Any.extract_string()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(186)

本文整理了Java中org.omg.CORBA.Any.extract_string()方法的一些代码示例,展示了Any.extract_string()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Any.extract_string()方法的具体详情如下:
包路径:org.omg.CORBA.Any
类名称:Any
方法名:extract_string

Any.extract_string介绍

暂无

代码示例

代码示例来源:origin: org.apache.yoko/yoko-spec-corba

public static java.lang.String extract(org.omg.CORBA.Any any) {
  return any.extract_string();
}

代码示例来源:origin: org.jacorb/jacorb-services

private Any evaluateNamedValue(DynAny any, String name) throws EvaluationException
{
  if (logger_.isDebugEnabled())
  {
    logger_.debug("evaluate assoc " + name + " on a Any of type: " + any.type());
  }
  final Any _result;
  final String _anyName = evaluateIdentifier(any, NAME).extract_string();
  if (logger_.isDebugEnabled())
  {
    logger_.debug("test if " + name + " == " + _anyName);
  }
  if (name.equals(_anyName))
  {
    logger_.debug("YES");
    _result = evaluateIdentifier(any, VALUE);
  }
  else
  {
    _result = null;
  }
  return _result;
}

代码示例来源:origin: org.jacorb/jacorb

public java.lang.String get_string() throws TypeMismatch
{
 checkDestroyed ();
 org.omg.CORBA.Any any = getRepresentation();
 try
 {
   return any.extract_string();
 }
 catch( org.omg.CORBA.BAD_OPERATION b )
 {
   throw new TypeMismatch();
 }
}

代码示例来源:origin: org.jacorb/jacorb-services

_fullQualifiedOperation = _props[0].value.extract_string();

代码示例来源:origin: org.apache.yoko/yoko-core

public void set_one_value(String propname, org.omg.CORBA.Any propvalue) {
  if (propname == null) {
    throw new org.omg.CORBA.BAD_PARAM(
      org.apache.yoko.orb.OB.MinorCodes
        .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName),
      org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName, CompletionStatus.COMPLETED_NO);
  }
  
  String s;
  try {
    s = propvalue.extract_string();
  } catch (org.omg.CORBA.BAD_OPERATION ex) {
    throw new org.omg.CORBA.BAD_TYPECODE(
      org.apache.yoko.orb.OB.MinorCodes
        .describeBadTypecode(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidPropertyType),
      org.apache.yoko.orb.OB.MinorCodes.MinorInvalidPropertyType, CompletionStatus.COMPLETED_NO);
  }
  //
  // Set value
  //
  values_.put(propname, s);
}

代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb

public String get_string()
  throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
      org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
  if (status == STATUS_DESTROYED) {
    throw wrapper.dynAnyDestroyed() ;
  }
  if (any.type().kind().value() != TCKind._tk_string)
    throw new TypeMismatch();
  return any.extract_string();
}

代码示例来源:origin: org.jacorb/jacorb-services

public String find_string_param( String key ) throws ParameterInvalid {
  int i = find_param_idx( key );
  if ( i == -1 ) {
    return null;
  }
  if( param[i].value.type().kind().value() != TCKind._tk_string ){
    throw new ParameterInvalid( i, "Invalid parameter type" );
  }
  return param[i].value.extract_string();
};
public Integer find_ulong_param( String key ) throws ParameterInvalid {

代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb

static boolean isInitialized(Any any) {
  // Returning simply the value of Any.isInitialized() is not enough.
  // The DynAny spec says that Anys containing null strings do not contain
  // a "legal value" (see ptc 99-10-07, 9.2.3.3)
  boolean isInitialized = ((AnyImpl)any).isInitialized();
  switch (any.type().kind().value()) {
    case TCKind._tk_string:
      return (isInitialized && (any.extract_string() != null));
    case TCKind._tk_wstring:
      return (isInitialized && (any.extract_wstring() != null));
  }
  return isInitialized;
}

代码示例来源:origin: org.apache.yoko/yoko-core

public void set_values(org.omg.CORBA.NVList values) {
  //
  // Create new, empty list
  //
  values_.clear();
  //
  // Copy named values
  //
  for (int i = 0; i < values.count(); i++) {
    org.omg.CORBA.NamedValue nv = null;
    try {
      nv = values.item(i);
    } catch (org.omg.CORBA.Bounds ex) {
      org.apache.yoko.orb.OB.Assert._OB_assert(ex);
    }
    String s = null;
    try {
      s = nv.value().extract_string();
    } catch (org.omg.CORBA.SystemException ex) {
      throw new org.omg.CORBA.BAD_TYPECODE(
        org.apache.yoko.orb.OB.MinorCodes
          .describeBadTypecode(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidPropertyType),
        org.apache.yoko.orb.OB.MinorCodes.MinorInvalidPropertyType, CompletionStatus.COMPLETED_NO);
    }
    if (nv.flags() != 0) {
      throw new org.omg.CORBA.INV_FLAG("Unsupported named value flag");
    }
    values_.put(nv.name(), s);
  }
}

代码示例来源:origin: apache/cxf

break;
case TCKind._tk_string:
  primitive.setValue(a.extract_string());
  break;
case TCKind._tk_wstring:

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

if ((threadId = data.extract_string()) != null)

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

if ((threadId = data.extract_string()) != null)

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

if ((threadId = data.extract_string()) != null)

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

if ((threadId = data.extract_string()) != null)

代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb

context[index] = nv.value().extract_string();
index++;

代码示例来源:origin: jboss.jbossts/jbossjts

if ((threadId = data.extract_string()) != null)

代码示例来源:origin: org.apache.yoko/yoko-rmi-impl

return any.extract_string();

代码示例来源:origin: jboss.jbossts/jbossjts

if ((threadId = data.extract_string()) != null)

代码示例来源:origin: jboss.jbossts/jbossjts

if ((threadId = data.extract_string()) != null)

代码示例来源:origin: org.jacorb/jacorb-services

private static void extractIntoEvaluationResult(EvaluationResult result, Any any)
  {
    switch (any.type().kind().value()) {
    case TCKind._tk_boolean:
      result.setBool(any.extract_boolean());
      break;
    case TCKind._tk_string:
      result.setString(any.extract_string());
      break;
    case TCKind._tk_long:
      result.setLong(any.extract_long());
      break;
    case TCKind._tk_short:
      result.setLong(any.extract_short());
      break;
    case TCKind._tk_ulonglong:
      result.setLongLong(any.extract_ulonglong());
      break;
    case TCKind._tk_float:
      result.setFloat(any.extract_float());
      break;
    case TCKind._tk_double:
      result.setDouble(any.extract_double());
      break;
    default:
      result.setAny(any);
      break;
    }
  }
}

相关文章