当前位置: 首页>>代码示例>>Java>>正文


Java Method类代码示例

本文整理汇总了Java中org.apache.olingo.server.api.uri.queryoption.expression.Method的典型用法代码示例。如果您正苦于以下问题:Java Method类的具体用法?Java Method怎么用?Java Method使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Method类属于org.apache.olingo.server.api.uri.queryoption.expression包,在下文中一共展示了Method类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: accept

import org.apache.olingo.server.api.uri.queryoption.expression.Method; //导入依赖的package包/类
public void accept(Expression expr) {
    if (expr instanceof Alias) {
        visit((Alias) expr);
    } else if (expr instanceof Binary) {
        visit((Binary) expr);
    } else if (expr instanceof Enumeration) {
        visit((Enumeration) expr);
    } else if (expr instanceof LambdaRef) {
        visit((LambdaRef) expr);
    } else if (expr instanceof Literal) {
        visit((Literal) expr);
    } else if (expr instanceof Member) {
        visit((Member) expr);
    } else if (expr instanceof Method) {
        visit((Method) expr);
    } else if (expr instanceof TypeLiteral) {
        visit((TypeLiteral) expr);
    } else if (expr instanceof Unary) {
        visit((Unary) expr);
    }
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:22,代码来源:ODataExpressionVisitor.java

示例2: isType

import org.apache.olingo.server.api.uri.queryoption.expression.Method; //导入依赖的package包/类
public FilterValidator isType(final FullQualifiedName fullName) {
  EdmType actualType = null;

  if (curExpression instanceof Member) {
    actualType = ((Member) curExpression).getType();
  } else if (curExpression instanceof TypeLiteral) {
    actualType = ((TypeLiteral) curExpression).getType();
  } else if (curExpression instanceof Literal) {
    actualType = ((Literal) curExpression).getType();
  } else if (curExpression instanceof Enumeration) {
    actualType = ((Enumeration) curExpression).getType();
  } else if (curExpression instanceof Unary) {
    actualType = ((UnaryImpl) curExpression).getType();
  } else if (curExpression instanceof Binary) {
    actualType = ((BinaryImpl) curExpression).getType();
  } else if (curExpression instanceof Method) {
    actualType = ((MethodImpl) curExpression).getType();
  }

  assertNotNull("Current expression not typed", actualType);
  assertEquals(fullName, actualType.getFullQualifiedName());
  return this;
}
 
开发者ID:apache,项目名称:olingo-odata4,代码行数:24,代码来源:FilterValidator.java

示例3: setPath

import org.apache.olingo.server.api.uri.queryoption.expression.Method; //导入依赖的package包/类
private void setPath(Expression expression) {
    if (expression instanceof Member) {
        setPath((Member) expression);
    } else if (expression instanceof Binary) {
        Binary binaryExpression = (Binary) expression;
        setPath(binaryExpression.getLeftOperand());
        setPath(binaryExpression.getRightOperand());
    } else if (expression instanceof Method) {
        Method method = (Method) expression;
        method.getParameters().forEach(this::setPath);
    }
}
 
开发者ID:Hevelian,项目名称:hevelian-olastic,代码行数:13,代码来源:MemberHandler.java

示例4: isMethod

import org.apache.olingo.server.api.uri.queryoption.expression.Method; //导入依赖的package包/类
public FilterValidator isMethod(final MethodKind methodKind, final int parameterCount) {
  assertTrue("Current expression is not a methodCall", curExpression instanceof Method);
  Method methodCall = (Method) curExpression;
  assertEquals(methodKind, methodCall.getMethod());
  assertEquals(parameterCount, methodCall.getParameters().size());
  return this;
}
 
开发者ID:apache,项目名称:olingo-odata4,代码行数:8,代码来源:FilterValidator.java

示例5: getType

import org.apache.olingo.server.api.uri.queryoption.expression.Method; //导入依赖的package包/类
protected static EdmType getType(final Expression expression) throws UriParserException {
  EdmType type;
  if (expression instanceof Literal) {
    type = ((Literal) expression).getType();
  } else if (expression instanceof TypeLiteral) {
    type = ((TypeLiteral) expression).getType();
  } else if (expression instanceof Enumeration) {
    type = ((Enumeration) expression).getType();
  } else if (expression instanceof Member) {
    type = ((Member) expression).getType();
  } else if (expression instanceof Unary) {
    type = ((UnaryImpl) expression).getType();
  } else if (expression instanceof Binary) {
    type = ((BinaryImpl) expression).getType();
  } else if (expression instanceof Method) {
    type = ((MethodImpl) expression).getType();
  } else if (expression instanceof Alias) {
    final AliasQueryOption alias = ((AliasImpl) expression).getAlias();
    type = alias == null || alias.getValue() == null ? null : getType(alias.getValue());
  } else if (expression instanceof LambdaRef) {
    throw new UriParserSemanticException("Type determination not implemented.",
        UriParserSemanticException.MessageKeys.NOT_IMPLEMENTED, expression.toString());
  } else {
    throw new UriParserSemanticException("Unknown expression type.",
        UriParserSemanticException.MessageKeys.NOT_IMPLEMENTED, expression.toString());
  }
  if (type != null && type.getKind() == EdmTypeKind.DEFINITION) {
    type = ((EdmTypeDefinition) type).getUnderlyingType();
  }
  return type;
}
 
开发者ID:apache,项目名称:olingo-odata4,代码行数:32,代码来源:ExpressionParser.java

示例6: visit

import org.apache.olingo.server.api.uri.queryoption.expression.Method; //导入依赖的package包/类
void visit(@SuppressWarnings("unused") Method expr) {
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:3,代码来源:ODataExpressionVisitor.java

示例7: goParameter

import org.apache.olingo.server.api.uri.queryoption.expression.Method; //导入依赖的package包/类
public FilterValidator goParameter(final int parameterIndex) {
  assertTrue("Current expression not a methodCall", curExpression instanceof Method);
  Method methodCall = (Method) curExpression;
  curExpression = methodCall.getParameters().get(parameterIndex);
  return this;
}
 
开发者ID:apache,项目名称:olingo-odata4,代码行数:7,代码来源:FilterValidator.java


注:本文中的org.apache.olingo.server.api.uri.queryoption.expression.Method类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。