/** * Returns <code>true</code> if the given type participates in Editor * hierarchies. */ private boolean shouldExamine(JType type) { JClassType classType = type.isClassOrInterface(); if (classType == null) { return false; } return editorIntf.isAssignableFrom(classType) || isEditorIntf.isAssignableFrom(classType); } }
/** * Returns <code>true</code> if the given type participates in Editor * hierarchies. */ private boolean shouldExamine(JType type) { JClassType classType = type.isClassOrInterface(); if (classType == null) { return false; } return editorIntf.isAssignableFrom(classType) || isEditorIntf.isAssignableFrom(classType); } }
if (!leafValueEditorIntf.isAssignableFrom(editorType)) { for (JClassType type : editorType.getFlattenedSupertypeHierarchy()) { for (JField field : type.getFields()) { EditorAccess access = EditorAccess.via(method); if (access.getPath().equals("as") && isEditorIntf.isAssignableFrom(editorType)) { && compositeEditorIntf.isAssignableFrom(editorType)) { if (compositeEditorIntf.isAssignableFrom(editorType)) { JClassType subEditorType = calculateCompositeTypes(editorType)[1]; EditorAccess access = EditorAccess.root(subEditorType);
if (!leafValueEditorIntf.isAssignableFrom(editorType)) { for (JClassType type : editorType.getFlattenedSupertypeHierarchy()) { for (JField field : type.getFields()) { EditorAccess access = EditorAccess.via(method); if (access.getPath().equals("as") && isEditorIntf.isAssignableFrom(editorType)) { && compositeEditorIntf.isAssignableFrom(editorType)) { if (compositeEditorIntf.isAssignableFrom(editorType)) { JClassType subEditorType = calculateCompositeTypes(editorType)[1]; EditorAccess access = EditorAccess.root(subEditorType);
private List<EditorData> createEditorData(EditorAccess access) throws UnableToCompleteException { TreeLogger subLogger = logger.branch(TreeLogger.DEBUG, "Examining " + access.toString()); List<EditorData> toReturn = new ArrayList<EditorData>(); // Are we looking at a view that implements IsEditor? if (access.isEditor()) { EditorAccess subAccess = EditorAccess.via(access, calculateIsEditedType(subLogger, access.getEditorType())); toReturn = createEditorData(subAccess); // If an object only implements IsEditor, return now if (!editorIntf.isAssignableFrom(access.getEditorType())) { return toReturn; } } // Determine the Foo in Editor<Foo> JClassType expectedToEdit = calculateEditedType(subLogger, access.getEditorType()); EditorData.Builder builder = new EditorData.Builder(subLogger); builder.access(access); builder.parent(editorSoFar); // Find the bean methods on the proxy interface findBeanPropertyMethods(access.getPath(), expectedToEdit, builder); toReturn.add(builder.build()); return toReturn; }
private List<EditorData> createEditorData(EditorAccess access) throws UnableToCompleteException { TreeLogger subLogger = logger.branch(TreeLogger.DEBUG, "Examining " + access.toString()); List<EditorData> toReturn = new ArrayList<EditorData>(); // Are we looking at a view that implements IsEditor? if (access.isEditor()) { EditorAccess subAccess = EditorAccess.via(access, calculateIsEditedType(subLogger, access.getEditorType())); toReturn = createEditorData(subAccess); // If an object only implements IsEditor, return now if (!editorIntf.isAssignableFrom(access.getEditorType())) { return toReturn; } } // Determine the Foo in Editor<Foo> JClassType expectedToEdit = calculateEditedType(subLogger, access.getEditorType()); EditorData.Builder builder = new EditorData.Builder(subLogger); builder.access(access); builder.parent(editorSoFar); // Find the bean methods on the proxy interface findBeanPropertyMethods(access.getPath(), expectedToEdit, builder); toReturn.add(builder.build()); return toReturn; }