private DotName getPackageName(DotName name) { if (name.isComponentized()) { while (name.isInner()) { name = name.prefix(); if (name == null) { throw new IllegalStateException("Could not determine package from corrupted class name"); } } return name.prefix(); } else { final int lastIndex = name.local().lastIndexOf("."); if (lastIndex == -1) { return name; } return DotName.createSimple(name.local().substring(0, name.local().lastIndexOf("."))); } }
continue; final String ejbName = beanClassInfo.name().local(); final AnnotationValue nameValue = messageBeanAnnotation.value("name"); final String beanName = (nameValue == null || nameValue.asString().isEmpty()) ? ejbName : propertyReplacer.replaceProperties(nameValue.asString());
continue; final String ejbName = sessionBeanClassInfo.name().local(); final AnnotationValue nameValue = sessionBeanAnnotation.value("name"); final String beanName = (nameValue == null || nameValue.asString().isEmpty()) ? ejbName : propertyReplacer.replaceProperties(nameValue.asString());
@Override public boolean isTopLevelClass() { // According to JLS "13.1 The Form of a Binary" return !classInfo.name().local().contains("$"); }
/** * Based on the the annotation type, its either entitymanager or entitymanagerfactory * * @param annotation * @return */ private String getClassLevelInjectionType(final AnnotationInstance annotation) { boolean isPC = annotation.name().local().equals("PersistenceContext"); return isPC ? ENTITY_MANAGER_CLASS : ENTITY_MANAGERFACTORY_CLASS; }
private boolean isPersistenceContext(final AnnotationInstance annotation) { return annotation.name().local().equals("PersistenceContext"); }
/** * Based on the the annotation type, its either entitymanager or entitymanagerfactory * * @param annotation * @return */ private String getClassLevelInjectionType(final AnnotationInstance annotation) { boolean isPC = annotation.name().local().equals("PersistenceContext"); return isPC ? ENTITY_MANAGER_CLASS : ENTITY_MANAGERFACTORY_CLASS; }
private boolean isPersistenceUnit(final AnnotationInstance annotation) { return annotation.name().local().equals("PersistenceUnit"); }
private boolean isPersistenceUnits(final AnnotationInstance annotation) { return annotation.name().local().equals("PersistenceUnits"); }
private boolean isPersistenceUnits(final AnnotationInstance annotation) { return annotation.name().local().equals("PersistenceUnits"); }
private void addClassName(DotName name) { if (! nameTable.containsKey(name)) { addString(name.local()); nameTable.put(name, null); } DotName prefix = name.prefix(); if (prefix != null) addClassName(prefix); } }
private static String getUrlPattern(final ClassInfo clazz) { final AnnotationInstance webServiceAnnotation = getWebServiceAnnotation(clazz); final String serviceName = getStringAttribute(webServiceAnnotation, "serviceName"); return "/" + (serviceName != null ? serviceName : clazz.name().local()); }
@Override public String getElementName() { return info.simpleName() == null ? info.name().local() : info.simpleName(); }