本文整理汇总了Java中org.opendaylight.yangtools.yang.binding.Augmentable类的典型用法代码示例。如果您正苦于以下问题:Java Augmentable类的具体用法?Java Augmentable怎么用?Java Augmentable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Augmentable类属于org.opendaylight.yangtools.yang.binding包,在下文中一共展示了Augmentable类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: storeMethodsOfImplementedIfcs
import org.opendaylight.yangtools.yang.binding.Augmentable; //导入依赖的package包/类
private void storeMethodsOfImplementedIfcs(final Set<MethodDeclaration> methodStorage,
final List<Type> implementedIfcs) {
if (implementedIfcs == null || implementedIfcs.isEmpty()) {
return;
}
for (Type implementedIfc : implementedIfcs) {
if ((implementedIfc instanceof GeneratedType && !(implementedIfc instanceof GeneratedTransferObject))) {
final GeneratedType ifc = ((GeneratedType) implementedIfc);
storeMethodsOfIfc(methodStorage, ifc);
storeMethodsOfImplementedIfcs(methodStorage, ifc.getImplements());
} else if (implementedIfc.getFullyQualifiedName().equals(Augmentable.class.getName())) {
for (Method m : Augmentable.class.getMethods()) {
if (m.getName().equals(GET_AUGMENTATION_METHOD_NAME)) {
addToImports(JAVA_UTIL, HASH_MAP);
addToImports(JAVA_UTIL, MAP);
java.lang.reflect.Type returnType = m.getReturnType();
final String fullyQualifiedName = ((Class<?>) returnType).getName();
addToImports(getPackageFrom(fullyQualifiedName), getNameFrom(fullyQualifiedName));
TypeDeclaration augmentMethodType = new TypeDeclaration(getPackageFrom(fullyQualifiedName),
getNameFrom(fullyQualifiedName), new TypeDeclaration(genType));
augmentField = createFieldFromGetMethod(new MethodDeclaration(augmentMethodType, m.getName(),
null));
}
}
}
}
}
示例2: assertHasAugmentation
import org.opendaylight.yangtools.yang.binding.Augmentable; //导入依赖的package包/类
public static <T extends Augmentable<T>> void assertHasAugmentation(T object,
Class<? extends Augmentation<T>> augmentation) {
assertNotNull(object);
assertNotNull("Augmentation " + augmentation.getSimpleName() + " is not present.", object.getAugmentation(augmentation));
}
示例3: from
import org.opendaylight.yangtools.yang.binding.Augmentable; //导入依赖的package包/类
public static <T extends Augmentable<T>> AugmentationVerifier<T> from(T obj) {
return new AugmentationVerifier<>(obj);
}
示例4: augmentableTypeFor
import org.opendaylight.yangtools.yang.binding.Augmentable; //导入依赖的package包/类
public static ParameterizedType augmentableTypeFor(Type valueType) {
final Type augmentable = typeForClass(Augmentable.class);
return parameterizedTypeFor(augmentable, valueType);
}