/** * Gets a human readable description of the location in the file */ default String getDescription() { TypeReferenceLocation location = getReferenceLocation(); return location.toReadablePrefix() + " '" + getResolvedSourceSnippit() + "'"; }
/** * Gets a human readable description of the location in the file */ default String getDescription() { TypeReferenceLocation location = getReferenceLocation(); return location.toReadablePrefix() + " '" + getResolvedSourceSnippit() + "'"; }
private void extractEJBMetadata(GraphRewrite event, JavaTypeReferenceModel javaTypeReference) { javaTypeReference.getFile().setGenerateSourceReport(true); JavaAnnotationTypeReferenceModel annotationTypeReference = (JavaAnnotationTypeReferenceModel) javaTypeReference; JavaClassModel ejbClass = getJavaClass(javaTypeReference); String ejbName = getAnnotationLiteralValue(annotationTypeReference, "name"); if (Strings.isNullOrEmpty(ejbName)) { ejbName = ejbClass.getClassName(); } String sessionType = javaTypeReference.getResolvedSourceSnippit() .substring(javaTypeReference.getResolvedSourceSnippit().lastIndexOf(".") + 1); Service<EjbSessionBeanModel> sessionBeanService = new GraphService<>(event.getGraphContext(), EjbSessionBeanModel.class); EjbSessionBeanModel sessionBean = sessionBeanService.create(); Set<ProjectModel> applications = ProjectTraversalCache.getApplicationsForProject(event.getGraphContext(), javaTypeReference.getFile().getProjectModel()); sessionBean.setApplications(applications); sessionBean.setBeanName(ejbName); sessionBean.setEjbClass(ejbClass); sessionBean.setSessionType(sessionType); }
private void extractEJBMetadata(GraphRewrite event, JavaTypeReferenceModel javaTypeReference) { javaTypeReference.getFile().setGenerateSourceReport(true); JavaAnnotationTypeReferenceModel annotationTypeReference = (JavaAnnotationTypeReferenceModel) javaTypeReference; JavaClassModel ejbClass = getJavaClass(javaTypeReference); String ejbName = getAnnotationLiteralValue(annotationTypeReference, "name"); if (Strings.isNullOrEmpty(ejbName)) { ejbName = ejbClass.getClassName(); } String sessionType = javaTypeReference.getResolvedSourceSnippit() .substring(javaTypeReference.getResolvedSourceSnippit().lastIndexOf(".") + 1); Service<EjbSessionBeanModel> sessionBeanService = new GraphService<>(event.getGraphContext(), EjbSessionBeanModel.class); EjbSessionBeanModel sessionBean = sessionBeanService.create(); Set<ProjectModel> applications = ProjectTraversalCache.getApplicationsForProject(event.getGraphContext(), javaTypeReference.getFile().getProjectModel()); sessionBean.setApplications(applications); sessionBean.setBeanName(ejbName); sessionBean.setEjbClass(ejbClass); sessionBean.setSessionType(sessionType); }
String pattern = typeReferenceModel.getResolvedSourceSnippit(); String[] keyArray = pattern.split("\\.");
String pattern = typeReferenceModel.getResolvedSourceSnippit(); String[] keyArray = pattern.split("\\.");
hintReducedDTO.setJavaFQCN(strings.getOrAdd(((JavaTypeReferenceModel) fileLocationModel).getResolvedSourceSnippit()));
.getResolvedSourceSnippit()); if (referenceResult.matches())
.getResolvedSourceSnippit()); if (referenceResult.matches())