List of usage examples for org.eclipse.jdt.core.dom EnumDeclaration SUPER_INTERFACE_TYPES_PROPERTY
ChildListPropertyDescriptor SUPER_INTERFACE_TYPES_PROPERTY
To view the source code for org.eclipse.jdt.core.dom EnumDeclaration SUPER_INTERFACE_TYPES_PROPERTY.
Click Source Link
From source file:org.eclipse.emf.codegen.merge.java.facade.ast.ASTJEnum.java
License:Open Source License
public void addSuperInterface(String superInterface) { if (addedSuperInterfaces == null) { addedSuperInterfaces = new ArrayList<String>(); }/*from ww w . j a va2 s.co m*/ addedSuperInterfaces.add(superInterface); addValueToListProperty(getASTNode(), superInterface, EnumDeclaration.SUPER_INTERFACE_TYPES_PROPERTY, ASTNode.SIMPLE_TYPE); }
From source file:org.eclipse.emf.codegen.merge.java.facade.ast.ASTJEnum.java
License:Open Source License
public void setSuperInterfaces(String[] superInterfaces) { this.superInterfaces = superInterfaces; this.addedSuperInterfaces = null; setListNodeProperty(getASTNode(), superInterfaces, EnumDeclaration.SUPER_INTERFACE_TYPES_PROPERTY, ASTNode.SIMPLE_TYPE);//from www .jav a2 s .c o m }
From source file:org.flowerplatform.codesync.code.java.type_provider.JavaTypeProvider.java
License:Open Source License
@Override public String getType(Object object) { IFileAccessController fileAccessController = CorePlugin.getInstance().getFileAccessController(); if (fileAccessController.isFile(object)) { if (fileAccessController.isDirectory(object)) { return CodeSyncCodeConstants.FOLDER; } else {/*from w w w .jav a 2 s .com*/ return CodeSyncCodeConstants.FILE; } } else if (object instanceof TypeDeclaration) { if (((TypeDeclaration) object).isInterface()) { return INTERFACE; } else { return CLASS; } } else if (object instanceof Annotation) { return ANNOTATION; } else if (object instanceof Expression || object instanceof Type) { ASTNode node = (ASTNode) object; StructuralPropertyDescriptor descriptor = node.getLocationInParent(); if (descriptor.equals(TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY) || descriptor.equals(EnumDeclaration.SUPER_INTERFACE_TYPES_PROPERTY)) { return SUPER_INTERFACE; } else if (descriptor.equals(EnumConstantDeclaration.ARGUMENTS_PROPERTY)) { return ENUM_CONSTANT_ARGUMENT; } return null; } else { return directMap.get(object.getClass()); } }
From source file:org.jboss.forge.roaster.model.impl.JDTHelper.java
License:Open Source License
@SuppressWarnings("unchecked") public static List<Type> getInterfaces(final BodyDeclaration dec) { StructuralPropertyDescriptor desc;/*from ww w. ja v a 2s . co m*/ if (dec instanceof EnumDeclaration) { desc = EnumDeclaration.SUPER_INTERFACE_TYPES_PROPERTY; } else { desc = TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY; } return (List<Type>) dec.getStructuralProperty(desc); }