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


Java UnknownTypeException类代码示例

本文整理汇总了Java中javax.lang.model.type.UnknownTypeException的典型用法代码示例。如果您正苦于以下问题:Java UnknownTypeException类的具体用法?Java UnknownTypeException怎么用?Java UnknownTypeException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


UnknownTypeException类属于javax.lang.model.type包,在下文中一共展示了UnknownTypeException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visitUnknown

import javax.lang.model.type.UnknownTypeException; //导入依赖的package包/类
@Override
public Void visitUnknown(TypeMirror t, Types types) {
    try {
        return super.visitUnknown(t, types);
    } catch (UnknownTypeException ex) {
        System.err.println("caught " + ex);
        return null;
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:10,代码来源:TestSymtabItems.java

示例2: getActions

import javax.lang.model.type.UnknownTypeException; //导入依赖的package包/类
public Action[] getActions(NodeActionsProvider original, Object node) throws UnknownTypeException, org.netbeans.spi.viewmodel.UnknownTypeException {
    Action[] actions = original.getActions(node);
    List myActions = new ArrayList();
    if (node instanceof ObjectVariable) {
        ObjectVariable objectVariable = (ObjectVariable) node;
        if (objectVariable.getClassType().getName().equals("org.jbpm.ruleflow.instance.RuleFlowProcessInstance")) {

            myActions.add(
                    Models.createAction(
                            "Open ProcessInstance Viewer",
                            new ProcessInstanceViewerAction(objectVariable),
                            Models.MULTISELECTION_TYPE_EXACTLY_ONE));
        }
    }
    if (myActions.isEmpty()) {
        return actions;
    }
    ArrayList actionToAdd = new ArrayList();
    actionToAdd.addAll(Arrays.asList(actions));
    actionToAdd.addAll(myActions);
    return (Action[]) actionToAdd.toArray(new Action[actionToAdd.size()]);
}
 
开发者ID:jGauravGupta,项目名称:jBPMNSuite,代码行数:23,代码来源:LocalsViewActionsProviderFilter.java

示例3: addAdapterForField

import javax.lang.model.type.UnknownTypeException; //导入依赖的package包/类
private void addAdapterForField(
    ImmutableMap.Builder<FieldDescriptor, AdapterDescriptor> fieldAdapterMap,
    FieldDescriptor field, boolean allowSerializable) {
  TypeMirror fieldType = field.type().get();
  //noinspection ConstantConditions
  if (!fieldType.getKind().isPrimitive()) {
    AdapterDescriptor adapter = adapterFactory.create(fieldType, allowSerializable);
    if (adapter != null) {
      fieldAdapterMap.put(field, adapter);
    } else {
      throw new UnknownTypeException(fieldType, field.element());
    }
  }
}
 
开发者ID:grandstaish,项目名称:paperparcel,代码行数:15,代码来源:PaperParcelDescriptor.java

示例4: performDefaultAction

import javax.lang.model.type.UnknownTypeException; //导入依赖的package包/类
public void performDefaultAction(NodeActionsProvider original, Object node) throws UnknownTypeException, org.netbeans.spi.viewmodel.UnknownTypeException {
    original.performDefaultAction(node);
}
 
开发者ID:jGauravGupta,项目名称:jBPMNSuite,代码行数:4,代码来源:LocalsViewActionsProviderFilter.java

示例5: lunch

import javax.lang.model.type.UnknownTypeException; //导入依赖的package包/类
/**
 * Used on every game turn. Method checks "next" by direction cell for some
 * {@link CellElement} and if it have found - decides what to do with it.
 * 
 * @throws UnknownTypeException
 *             If not found what to do with found {@link CellElement}
 */
private void lunch() {
	if (direction == Direction.STOP) {
		return;
	}
	CellElement headTo = head.lookForward(direction);
	if (headTo != null) {
		if (headTo instanceof Piece) {
			Piece toPiece = (Piece) headTo;
			if (toPiece.parent.equals(this)) {
				kill();// ate himself
			} else if (toPiece.isHead()) {
				duelWith(toPiece.parent);// someone will die
			} else {
				int cutLength = toPiece.parent.nipOff(toPiece);
				score += cutLength * ALIVE_TAIL_MULTIPLIER;
				grow(cutLength / 2);
				// ate someone`s tail
			}

		} else if (headTo instanceof Food) {
			dinner((Food) headTo);
		} else if (headTo instanceof Seed) {
			weapon = (Seed) headTo;
		} else if (headTo instanceof Plant) {
			if (((Plant) headTo).getType() == PlantType.CATCHER) {
				kill();
			}
		} else {
			throw new UnknownTypeException(null, headTo);
		}
	}
}
 
开发者ID:AvaPirA,项目名称:uber-snake,代码行数:40,代码来源:Snake.java

示例6: visitOther

import javax.lang.model.type.UnknownTypeException; //导入依赖的package包/类
/**
 * Visits an unknown kind of type. This can occur if the language evolves and new kinds of types are added to the
 * {@link TypeMirror} hierarchy.
 *
 * <p>The default implementation of this method in {@code TypeKindVisitor7WithIntersectionType} will always throw
 * {@link UnknownTypeException}. This behavior is not required of a subclass.
 *
 * @param typeMirror the type to visit
 * @param parameter a visitor-specified parameter
 * @return a visitor-specified result
 * @throws UnknownTypeException a visitor implementation may optionally throw this exception
 */
@Nullable
public R visitOther(TypeMirror typeMirror, @Nullable P parameter) {
    throw new UnknownTypeException(typeMirror, parameter);
}
 
开发者ID:fschopp,项目名称:java-types,代码行数:17,代码来源:ExtendedTypeKindVisitor7.java


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