repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/servicecomb-java-chassis | 1,140 | core/src/main/java/org/apache/servicecomb/core/event/InvocationFinishEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.core.event;
import org.apache.servicecomb.core.Invocation;
import org.apache.servicecomb.swagger.invocation.Response;
public class InvocationFinishEvent extends InvocationWithResponseEvent {
public InvocationFinishEvent(Invocation invocation, Response response) {
super(invocation, response);
}
}
|
apache/servicecomb-pack | 1,105 | acceptance-tests/acceptance-pack-cluster-spring-demo/src/test/java/org/apache/servicecomb/pack/RunCucumberIT.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.pack;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty", "html:target/cucumber"},
features = "src/test/resources")
public class RunCucumberIT {
}
|
apache/servicecomb-pack | 1,139 | alpha/alpha-core/src/main/java/org/apache/servicecomb/pack/alpha/core/fsm/TxState.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.pack.alpha.core.fsm;
public enum TxState {
ACTIVE,
FAILED,
COMMITTED,
COMPENSATION_SENT, // The compensation method has been called to wait for TxCompensatedEvent
COMPENSATED, // Just for compatibility with historical data deserialization in ES
COMPENSATED_SUCCEED,
COMPENSATED_FAILED,
}
|
apache/servicecomb-samples | 1,102 | java-chassis-integration-tests/demo-schema/src/main/java/org/apache/servicecomb/demo/server/TestResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.demo.server;
public class TestResponse {
private User user;
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
@Override
public String toString() {
return "TestResponse [user=" + user + "]";
}
}
|
apache/shardingsphere-example | 1,083 | example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisOrderItemRepository.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shardingsphere.example.core.mybatis.repository;
import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface MybatisOrderItemRepository extends OrderItemRepository {
}
|
apache/shardingsphere | 1,135 | infra/common/src/main/java/org/apache/shardingsphere/infra/datanode/DataNodeInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shardingsphere.infra.datanode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* Data node info.
*/
@RequiredArgsConstructor
@Getter
public final class DataNodeInfo {
private final String prefix;
private final int suffixMinLength;
private final char paddingChar;
}
|
apache/shardingsphere | 1,137 | infra/common/src/main/java/org/apache/shardingsphere/infra/rule/builder/RuleBuilder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shardingsphere.infra.rule.builder;
import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
import org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPI;
/**
* Rule builder.
*
* @param <T> type of rule configuration
*/
@SingletonSPI
public interface RuleBuilder<T> extends OrderedSPI<T> {
}
|
apache/shenyu | 1,131 | shenyu-infra/shenyu-infra-common/src/main/java/org/apache/shenyu/infra/common/InfraParentProperties.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shenyu.infra.common;
import org.apache.shenyu.common.constant.Constants;
import org.apache.shenyu.common.constant.ShenyuModuleConstants;
public class InfraParentProperties {
public static final String PARENT_CONFIG_PREFIX = Constants.SHENYU + Constants.DOT
+ ShenyuModuleConstants.SYNC;
}
|
apache/sirona | 1,160 | agent/javaagent/src/test/java/org/apache/sirona/javaagent/Transformers.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.sirona.javaagent;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Transformers {
Class<?>[] value() default { SironaTransformer.class };
}
|
apache/sis | 1,148 | endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/internal/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Utility classes for the implementation of SIS storage classes.
*
* <STRONG>Do not use!</STRONG>
*
* This package is for internal use by SIS only. Classes in this package
* may change in incompatible ways in any future version without notice.
*
* @author Martin Desruisseaux (Geomatys)
*/
package org.apache.sis.storage.internal;
|
apache/skywalking-java | 1,138 | test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/Service1Application.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.e2e;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Service1Application {
public static void main(String[] args) {
SpringApplication.run(Service1Application.class, args);
}
}
|
apache/skywalking | 1,091 | oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/response/NodeInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.skywalking.library.elasticsearch.response;
import lombok.Data;
@Data
public final class NodeInfo {
@Data
public static class Version {
private String distribution = "ElasticSearch";
private String number;
}
private Version version;
}
|
apache/stanbol | 1,103 | commons/solr/extras/kuromoji/src/main/java/org/apache/stanbol/commons/solr/extras/kuromoji/impl/KuromojiAnalyzerFactoryActivator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.stanbol.commons.solr.extras.kuromoji.impl;
import org.apache.stanbol.commons.solr.utils.AbstractAnalyzerFactoryActivator;
public final class KuromojiAnalyzerFactoryActivator extends AbstractAnalyzerFactoryActivator {
public KuromojiAnalyzerFactoryActivator() {
super();
}
}
|
apache/stratos | 1,090 | components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/topology/ApplicationClustersCreatedEventListener.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.stratos.messaging.listener.topology;
import org.apache.stratos.messaging.listener.EventListener;
/**
* This will get triggered when clusters created for an application.
*/
abstract public class ApplicationClustersCreatedEventListener extends EventListener {
}
|
apache/stratos | 1,097 | components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/policy/PolicyDoesNotExistException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.stratos.autoscaler.exception.policy;
import org.apache.stratos.autoscaler.exception.AutoScalerException;
/**
*
*/
public class PolicyDoesNotExistException extends AutoScalerException {
public PolicyDoesNotExistException(String msg) {
super(msg);
}
}
|
apache/streampipes | 1,128 | streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/file/FileConstants.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.streampipes.manager.file;
import org.apache.streampipes.storage.management.StorageDispatcher;
public class FileConstants {
public static final String FILES_BASE_DIR = StorageDispatcher
.INSTANCE
.getNoSqlStore()
.getSpCoreConfigurationStorage()
.get()
.getFilesDir();
}
|
apache/streampipes | 1,136 | streampipes-model/src/main/java/org/apache/streampipes/model/NotificationCount.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.streampipes.model;
public class NotificationCount {
private Integer count;
public NotificationCount(Integer count) {
this.count = count;
}
public NotificationCount() {
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
}
|
apache/struts | 1,119 | plugins/convention/src/test/java/org/apache/struts2/convention/actions/result/InheritedResultTestBase.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.convention.actions.result;
import org.apache.struts2.ActionSupport;
import org.apache.struts2.convention.annotation.Result;
@Result(name="error", location="error.jsp", params={"key", "value", "key1", "value1"})
public abstract class InheritedResultTestBase extends ActionSupport {
} |
apache/struts | 1,137 | plugins/tiles/src/main/java/org/apache/tiles/core/definition/NoSuchDefinitionException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.tiles.core.definition;
/**
* Exception thrown when a definition is not found.
*/
public class NoSuchDefinitionException extends DefinitionsFactoryException {
/**
* Constructor.
*
* @param msg Message.
*/
public NoSuchDefinitionException(String msg) {
super(msg);
}
}
|
apache/synapse | 1,143 | modules/samples/services/FastStockQuoteService/src/samples/services/GetQuote.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package samples.services;
public class GetQuote {
String symbol;
public GetQuote() {
}
public GetQuote(String symbol) {
this.symbol = symbol;
}
public String getSymbol() {
return symbol;
}
public void setSymbol(String symbol) {
this.symbol = symbol;
}
}
|
apache/syncope | 1,136 | common/am/lib/src/main/java/org/apache/syncope/common/lib/types/OIDCApplicationType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.syncope.common.lib.types;
public enum OIDCApplicationType {
WEB("web"),
NATIVE("native");
private final String externalForm;
OIDCApplicationType(final String external) {
this.externalForm = external;
}
public String getExternalForm() {
return externalForm;
}
}
|
apache/syncope | 1,141 | core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/ReportDAO.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.syncope.core.persistence.api.dao;
import java.util.List;
import org.apache.syncope.core.persistence.api.entity.Implementation;
import org.apache.syncope.core.persistence.api.entity.Report;
public interface ReportDAO extends DAO<Report> {
List<? extends Report> findByJobDelegate(Implementation delegate);
}
|
apache/tajo | 1,140 | tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientUnableToConnectException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tajo.client.v2.exception;
import org.apache.tajo.error.Errors;
import org.apache.tajo.exception.TajoException;
public class ClientUnableToConnectException extends TajoException {
public ClientUnableToConnectException(String address) {
super(Errors.ResultCode.CLIENT_UNABLE_TO_ESTABLISH_CONNECTION);
}
}
|
apache/tajo | 1,143 | tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/LogicalPlanPreprocessPhaseProvider.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tajo.plan.rewrite;
import java.util.Collection;
public abstract class LogicalPlanPreprocessPhaseProvider {
/**
* It returns LogicalPlanPreprocessPhase classes.
*
* @return LogicalPlanPreprocessPhase classes
*/
public abstract Collection<Class<? extends LogicalPlanPreprocessPhase>> getPhases();
}
|
apache/tapestry-5 | 1,129 | tapestry-cdi/src/test/java/org/apache/tapestry5/cdi/test/pages/SessionScopePage.java | // Copyright 2013 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.cdi.test.pages;
import jakarta.inject.Inject;
import org.apache.tapestry5.cdi.test.beans.Dessert;
public class SessionScopePage {
@Inject
private Dessert dessert1;
@Inject
private Dessert dessert2;
public String getSessionScopePojo(){
if(dessert1!=null && dessert1.getName().equals(dessert2.getName())){
dessert1.changeName();
return "session:" + dessert1.getName().equals(dessert2.getName());
}else{
return "";
}
}
}
|
apache/teaclave-java-tee-sdk | 1,117 | sdk/optimizationDetector/src/test/java/org/apache/teaclave/javasdk/tool/optimize/TestServices.java | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.teaclave.javasdk.tool.optimize;
import org.apache.teaclave.javasdk.common.annotations.EnclaveService;
public class TestServices {
@EnclaveService
public interface EnclaveServiceExample{
void bar();
}
public interface NormalServiceExample{
void bar();
}
}
|
apache/tez | 1,136 | hadoop-shim-impls/hadoop-shim-2.8/src/main/java/org/apache/tez/hadoop/shim/HadoopShim28Provider.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tez.hadoop.shim;
public class HadoopShim28Provider extends HadoopShimProvider {
@Override
public HadoopShim createHadoopShim(String hadoopVersion, int majorVersion, int minorVersion) {
if (majorVersion == 2 && minorVersion >= 8) {
return new HadoopShim28();
}
return null;
}
}
|
apache/tika | 1,147 | tika-core/src/main/java/org/apache/tika/concurrent/ConfigurableThreadPoolExecutor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tika.concurrent;
import java.util.concurrent.ExecutorService;
/**
* Allows Thread Pool to be Configurable.
*
* @since Apache Tika 1.11
*/
public interface ConfigurableThreadPoolExecutor extends ExecutorService {
public void setMaximumPoolSize(int threads);
public void setCorePoolSize(int threads);
}
|
apache/trafodion | 1,138 | core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4InputStream.java | // @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
// @@@ END COPYRIGHT @@@
package org.trafodion.jdbc.t4;
import java.io.IOException;
import java.io.InputStream;
public class TrafT4InputStream extends InputStream {
@Override
public int read() throws IOException {
// TODO Auto-generated method stub
return 0;
}
// Fields
TrafT4Lob lob_;
}
|
apache/tsfile | 1,152 | java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/DoubleRLBE.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.tsfile.encoding.encoder;
import java.io.ByteArrayOutputStream;
public class DoubleRLBE extends LongRLBE {
// constructor of DoubleRLBE
public DoubleRLBE() {
super();
}
@Override
public void encode(double value, ByteArrayOutputStream out) {
super.encode(Double.doubleToRawLongBits(value), out);
}
}
|
apache/twill | 1,145 | twill-common/src/main/java/org/apache/twill/filesystem/ForwardingLocationFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.twill.filesystem;
/**
*
*/
public abstract class ForwardingLocationFactory implements LocationFactory {
private final LocationFactory delegate;
protected ForwardingLocationFactory(LocationFactory delegate) {
this.delegate = delegate;
}
public LocationFactory getDelegate() {
return delegate;
}
}
|
apache/wicket | 1,146 | wicket-core/src/main/java/org/apache/wicket/markup/head/IReferenceHeaderItem.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.head;
import org.apache.wicket.request.resource.ResourceReference;
/**
* Interface for {@link HeaderItem}s that represent a {@link ResourceReference}.
*
* @author papegaaij
*/
public interface IReferenceHeaderItem
{
/**
* @return the reference for the item.
*/
ResourceReference getReference();
}
|
apache/xmlbeans | 1,155 | src/test/java/xmlcursor/xpath/complex/checkin/XPathTestsMisc.java | /* Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package xmlcursor.xpath.complex.checkin;
import org.apache.xmlbeans.XmlCursor;
import org.junit.jupiter.api.Test;
import static xmlcursor.common.BasicCursorTestCase.cur;
public class XPathTestsMisc {
@Test
void testDelete() throws Exception {
String query = "*";
// TODO: add asserts
try (XmlCursor xc = cur(XPathTest.XML)) {
xc.selectPath(query);
while (xc.toNextSelection()) {
System.out.println(xc.xmlText());
}
}
}
}
|
apache/xmlgraphics-fop | 1,146 | fop-core/src/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* $Id$ */
package org.apache.fop.layoutengine;
import org.apache.fop.check.Check;
/**
* Defines the interface for check operations.
*/
public interface LayoutEngineCheck extends Check {
/**
* Called to perform the check.
* @param result the results from the processing run
*/
void check(LayoutResult result);
}
|
apache/xmlgraphics-fop | 1,155 | fop-core/src/test/java/org/apache/fop/render/ps/PSTestSuite.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* $Id$ */
package org.apache.fop.render.ps;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
* Test suite for FOP's PostScript output.
*/
@RunWith(Suite.class)
@SuiteClasses({
ImageHandlingTestCase.class,
ResourceOptimizationTestCase.class
})
public class PSTestSuite {
}
|
apache/zeppelin | 1,150 | livy/src/main/java/org/apache/zeppelin/livy/LivyPySparkInterpreter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.zeppelin.livy;
import java.util.Properties;
/**
* Livy PySpark interpreter for Zeppelin.
*/
public class LivyPySparkInterpreter extends LivyPySparkBaseInterpreter {
public LivyPySparkInterpreter(Properties property) {
super(property);
}
@Override
public String getSessionKind() {
return "pyspark";
}
}
|
google/adk-java | 1,155 | dev/src/main/java/com/google/adk/web/dto/RunEvalRequest.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.adk.web.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/**
* DTO for POST /apps/{appName}/eval_sets/{evalSetId}/run-eval requests. Contains information for
* running evaluations.
*/
public class RunEvalRequest {
@JsonProperty("evalIds")
public List<String> evalIds;
@JsonProperty("evalMetrics")
public List<String> evalMetrics;
public RunEvalRequest() {}
public List<String> getEvalIds() {
return evalIds;
}
public List<String> getEvalMetrics() {
return evalMetrics;
}
}
|
google/binnavi | 1,131 | src/main/java/com/google/security/zynamics/binnavi/debug/connection/packets/replies/AttachReply.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.binnavi.debug.connection.packets.replies;
/**
* Represents the reply to an Attach request sent to the debug client.
*/
public final class AttachReply extends DebuggerReply {
/**
* Creates a new Attach reply object.
*
* @param packetId Packet ID of the reply.
* @param errorCode Error code of the reply. If this error code is 0, the requested operation was
* successful.
*/
public AttachReply(final int packetId, final int errorCode) {
super(packetId, errorCode);
}
}
|
google/binnavi | 1,131 | src/main/java/com/google/security/zynamics/binnavi/debug/connection/packets/replies/DetachReply.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.binnavi.debug.connection.packets.replies;
/**
* Represents the reply to an Detach request sent to the debug client.
*/
public final class DetachReply extends DebuggerReply {
/**
* Creates a new Detach reply object.
*
* @param packetId Packet ID of the reply.
* @param errorCode Error code of the reply. If this error code is 0, the requested operation was
* successful.
*/
public DetachReply(final int packetId, final int errorCode) {
super(packetId, errorCode);
}
}
|
google/binnavi | 1,143 | src/main/java/com/google/security/zynamics/binnavi/Gui/Users/Interfaces/IUser.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.binnavi.Gui.Users.Interfaces;
/**
* The interface for the BinNavi user management.
*
* User management in BinNavi is strictly for convenience and concurrency simplification and does
* not provide any security.
*/
public interface IUser {
/**
* Function to get the user id for a user.
*
* @return The id of the current user object.
*/
int getUserId();
/**
* Function to get the user name for a user.
*
* @return The name of the current user object.
*/
String getUserName();
}
|
google/caliper | 1,146 | caliper-worker/src/main/java/com/google/caliper/worker/handler/RequestDispatcher.java | package com.google.caliper.worker.handler;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.caliper.bridge.WorkerRequest;
import com.google.common.collect.ImmutableMap;
import java.util.Map;
import javax.inject.Inject;
import javax.inject.Provider;
/** Dispatches {@link WorkerRequest}s to the appropriate handler. */
public final class RequestDispatcher {
private final ImmutableMap<Class<? extends WorkerRequest>, Provider<RequestHandler>>
requestHandlers;
@Inject
RequestDispatcher(Map<Class<? extends WorkerRequest>, Provider<RequestHandler>> requestHandlers) {
this.requestHandlers = ImmutableMap.copyOf(requestHandlers);
}
/** Dispatches the given request to the appropriate handler. */
public void dispatch(WorkerRequest request) throws Exception {
Class<? extends WorkerRequest> requestType = request.type();
Provider<RequestHandler> handlerProvider =
checkNotNull(
requestHandlers.get(requestType),
"No handler found for request of type %s",
requestType.getName());
handlerProvider.get().handleRequest(request);
}
}
|
google/cdep | 1,164 | cdep/src/main/java/io/cdep/cdep/yml/cdepmanifest/v3/iOS.java | /*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.cdep.cdep.yml.cdepmanifest.v3;
import io.cdep.annotations.NotNull;
import io.cdep.annotations.Nullable;
import io.cdep.cdep.yml.cdepmanifest.HardNameDependency;
@SuppressWarnings("unused")
public class iOS {
@Nullable
final public HardNameDependency dependencies[];
@Nullable
final public iOSArchive archives[];
iOS() {
this.dependencies = null;
this.archives = null;
}
public iOS(@Nullable HardNameDependency[] dependencies, @NotNull iOSArchive[] archives) {
this.dependencies = dependencies;
this.archives = archives;
}
}
|
google/copybara | 1,162 | java/com/google/copybara/git/github/api/Label.java | /*
* Copyright (C) 2020 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.copybara.git.github.api;
import com.google.api.client.util.Key;
import com.google.common.base.MoreObjects;
/**
* Represents a GitHub issue Label, e.g. https://developer.github.com/v3/issues/labels/#response-6
*/
public class Label {
@Key private long id;
@Key private String name;
public long getId() {
return id;
}
public String getName() {
return name;
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("id", id)
.add("name", name)
.toString();
}
}
|
google/depan | 1,130 | DepanPlatformUI/prod/src/com/google/devtools/depan/resources/analysis/AnalysisResources.java | /*
* Copyright 2016 The Depan Project Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.devtools.depan.resources.analysis;
import com.google.devtools.depan.resources.ResourceContainer;
/**
* @author <a href="leeca@pnambic.com">Lee Carver</a>
*/
public class AnalysisResources {
public static final String ROOT = "Resources";
private static final ResourceContainer ROOT_CONTAINER =
ResourceContainer.buildRootContainer(ROOT);
private AnalysisResources() {
// Prevent instantiation.
}
public static ResourceContainer getRoot() {
return ROOT_CONTAINER;
}
}
|
google/guava | 1,136 | android/guava-testlib/src/com/google/common/collect/testing/google/GoogleHelpers.java | /*
* Copyright (C) 2015 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.collect.testing.google;
import static junit.framework.Assert.fail;
import com.google.common.annotations.GwtCompatible;
import com.google.common.collect.Multimap;
/**
* Helper methods/assertions for use with {@code com.google.common.collect} types.
*
* @author Colin Decker
*/
@GwtCompatible
final class GoogleHelpers {
private GoogleHelpers() {}
static void assertEmpty(Multimap<?, ?> multimap) {
if (!multimap.isEmpty()) {
fail("Not true that " + multimap + " is empty");
}
}
}
|
google/guava | 1,169 | guava/src/com/google/common/collect/SortedMultisetBridge.java | /*
* Copyright (C) 2012 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.collect;
import com.google.common.annotations.GwtIncompatible;
import java.util.SortedSet;
import org.jspecify.annotations.Nullable;
/**
* Superinterface of {@link SortedMultiset} to introduce a bridge method for {@code elementSet()},
* to ensure binary compatibility with older Guava versions that specified {@code elementSet()} to
* return {@code SortedSet}.
*
* @author Louis Wasserman
*/
@GwtIncompatible
interface SortedMultisetBridge<E extends @Nullable Object> extends Multiset<E> {
@Override
SortedSet<E> elementSet();
}
|
google/j2objc | 1,106 | jre_emul/apache_harmony/classlib/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/MisprintBean.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Maxim V. Berkultsev
*/
package org.apache.harmony.beans.tests.support;
/**
* @author Maxim V. Berkultsev
*/
public class MisprintBean {
// public void addMisprintListener(MisprintListenerr ml) {}
public void removeMisprintListener(MisprintListenerr ml) {
}
}
|
googlearchive/gwt-google-apis | 1,137 | gadgets/gadgets/src/com/google/gwt/gadgets/client/NeedsDynamicHeight.java | /*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.gwt.gadgets.client;
import com.google.gwt.gadgets.client.GadgetFeature.FeatureName;
/**
* Indicates that a Gadget may need to be resized automatically by the
* container.
*/
@FeatureName("dynamic-height")
public interface NeedsDynamicHeight {
/**
* Entry point that gets called back to handle dynamic height feature
* initialization.
*
* @param feature an instance of the feature to use to invoke feature specific
* methods.
*/
void initializeFeature(DynamicHeightFeature feature);
}
|
googlearchive/leanback-showcase | 1,085 | app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/app/room/di/action/qualifier/LoadingActionQualifier.java | /*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.support.v17.leanback.supportleanbackshowcase.app.room.di.action.qualifier;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.inject.Qualifier;
/**
* Notice that the qualifier can be replaced with the @Name("plain text") easily. But the drawback
* for plain text is it is hard for future maintenance.
*/
@Qualifier
@Retention(RetentionPolicy.RUNTIME)
public @interface LoadingActionQualifier {
}
|
googlearchive/leanback-showcase | 1,085 | app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/app/room/di/action/qualifier/PreviewActionQualifier.java | /*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.support.v17.leanback.supportleanbackshowcase.app.room.di.action.qualifier;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.inject.Qualifier;
/**
* Notice that the qualifier can be replaced with the @Name("plain text") easily. But the drawback
* for plain text is it is hard for future maintenance.
*/
@Qualifier
@Retention(RetentionPolicy.RUNTIME)
public @interface PreviewActionQualifier {
}
|
googlesamples/androidtv-sample-inputs | 1,114 | library/src/androidTest/java/com/google/android/media/tv/companionlibrary/test/TestActivity.java | /*
* Copyright 2016 The Android Open Source Project.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.media.tv.companionlibrary.test;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
/**
* Dummy activity that acts as the setup activity for {@link TestTvInputService}
*/
public class TestActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(com.google.android.media.tv.companionlibrary.test.R.layout.test_activity);
}
} |
hibernate/hibernate-ogm | 1,097 | integrationtest/src/test/java/org/hibernate/ogm/test/integration/mongodb/service/PhoneNumberService.java | /*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.test.integration.mongodb.service;
import java.util.List;
import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import org.hibernate.ogm.test.integration.mongodb.model.PhoneNumber;
/**
* @author Gunnar Morling
*/
@Stateless
public class PhoneNumberService {
@Inject
private EntityManager entityManager;
public PhoneNumber createPhoneNumber(String name, String value) {
PhoneNumber phoneNumber = new PhoneNumber( name, value );
entityManager.persist( phoneNumber );
return phoneNumber;
}
public PhoneNumber getPhoneNumber(String name) {
List<PhoneNumber> result = entityManager.createQuery( "from PhoneNumber pn where name = :name", PhoneNumber.class ).setParameter( "name", name ).getResultList();
return result.isEmpty() ? null : result.iterator().next();
}
}
|
hibernate/hibernate-ogm | 1,126 | core/src/main/java/org/hibernate/ogm/type/impl/StringDateTypeDescriptor.java | /*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.type.impl;
import java.util.Date;
import org.hibernate.MappingException;
import org.hibernate.engine.spi.Mapping;
import org.hibernate.ogm.type.descriptor.impl.StringMappedGridTypeDescriptor;
import org.hibernate.ogm.type.descriptor.impl.TimestampDateTypeDescriptor;
/**
* For {@link Date} objects use a String representation.
*
* @author Davide D'Alto <davide@hibernate.org>
*/
public class StringDateTypeDescriptor extends AbstractGenericBasicType<Date> {
public static final StringDateTypeDescriptor INSTANCE = new StringDateTypeDescriptor();
public StringDateTypeDescriptor() {
super( StringMappedGridTypeDescriptor.INSTANCE, TimestampDateTypeDescriptor.INSTANCE );
}
@Override
public int getColumnSpan(Mapping mapping) throws MappingException {
return 1;
}
@Override
public String getName() {
return "string_date";
}
}
|
hibernate/hibernate-orm | 1,068 | hibernate-core/src/test/java/org/hibernate/orm/test/mapping/inheritance/discriminator/AccountOwner.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.mapping.inheritance.discriminator;
import java.util.HashSet;
import java.util.Set;
/**
* @author Jan Schatteman
*/
public class AccountOwner {
private Long id;
private String description;
private Set<AbstractAccount> creditAccounts = new HashSet<>();
private Set<AbstractAccount> debitAccounts = new HashSet<>();
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Set<AbstractAccount> getCreditAccounts() {
return creditAccounts;
}
public void setCreditAccounts(Set<AbstractAccount> creditAccounts) {
this.creditAccounts = creditAccounts;
}
public Set<AbstractAccount> getDebitAccounts() {
return debitAccounts;
}
public void setDebitAccounts(Set<AbstractAccount> debitAccounts) {
this.debitAccounts = debitAccounts;
}
}
|
hibernate/hibernate-orm | 1,076 | hibernate-core/src/test/java/org/hibernate/orm/test/softdelete/discovery/pkg/AnEntity.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.softdelete.discovery.pkg;
import java.util.Collection;
import jakarta.persistence.CollectionTable;
import jakarta.persistence.Column;
import jakarta.persistence.ElementCollection;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Basic;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.Table;
/**
* @author Steve Ebersole
*/
@Entity
@Table(name = "the_table")
public class AnEntity {
@Id
private Integer id;
@Basic
private String name;
@ElementCollection
@CollectionTable(name="elements", joinColumns = @JoinColumn(name = "owner_fk"))
@Column(name="txt")
private Collection<String> elements;
protected AnEntity() {
// for Hibernate use
}
public AnEntity(Integer id, String name) {
this.id = id;
this.name = name;
}
public Integer getId() {
return id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
hibernate/hibernate-orm | 1,090 | hibernate-core/src/main/java/org/hibernate/boot/internal/DefaultCustomEntityDirtinessStrategy.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.internal;
import org.hibernate.CustomEntityDirtinessStrategy;
import org.hibernate.Session;
import org.hibernate.persister.entity.EntityPersister;
/**
* The default implementation of {@link CustomEntityDirtinessStrategy} which does nada.
*
* @author Steve Ebersole
*/
public class DefaultCustomEntityDirtinessStrategy implements CustomEntityDirtinessStrategy {
public static final DefaultCustomEntityDirtinessStrategy INSTANCE = new DefaultCustomEntityDirtinessStrategy();
@Override
public boolean canDirtyCheck(Object entity, EntityPersister persister, Session session) {
return false;
}
@Override
public boolean isDirty(Object entity, EntityPersister persister, Session session) {
return false;
}
@Override
public void resetDirty(Object entity, EntityPersister persister, Session session) {
}
@Override
public void findDirty(
Object entity,
EntityPersister persister,
Session session,
DirtyCheckContext dirtyCheckContext) {
}
}
|
hibernate/hibernate-orm | 1,102 | hibernate-core/src/test/java/org/hibernate/orm/test/mapping/fetch/depth/SysModule.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.mapping.fetch.depth;
import java.util.Set;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.JoinTable;
import jakarta.persistence.ManyToMany;
import jakarta.persistence.Table;
@Entity
@Table(name = "sys_mod")
public class SysModule {
@Id
private Integer id;
@Column(name = "name")
private String name;
// @OneToMany( cascade = CascadeType.PERSIST, fetch = FetchType.EAGER )
// @JoinColumn( name = "target_mod_fk" )
@ManyToMany( targetEntity = SysModule.class, cascade = { CascadeType.PERSIST }, fetch = FetchType.EAGER )
@JoinTable(
name = "sys_group_mod",
joinColumns = @JoinColumn(name = "src_fk", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "target_fk", referencedColumnName = "id")
)
private Set<SysModule> targetModules;
}
|
hibernate/hibernate-orm | 1,105 | tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/includeexclude/IncludeExcludeTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.processor.test.includeexclude;
import org.hibernate.processor.HibernateProcessor;
import org.hibernate.processor.test.util.CompilationTest;
import org.hibernate.processor.test.util.WithClasses;
import org.hibernate.processor.test.util.WithProcessorOption;
import org.junit.jupiter.api.Test;
import static org.hibernate.processor.test.util.TestUtil.assertMetamodelClassGeneratedFor;
import static org.hibernate.processor.test.util.TestUtil.assertNoMetamodelClassGeneratedFor;
@CompilationTest
class IncludeExcludeTest {
@Test
@WithClasses({ Foo.class, Bar.class, Baz.class })
@WithProcessorOption(key = HibernateProcessor.INCLUDE, value = "org.hibernate.processor.test.includeexclude.*")
@WithProcessorOption(key = HibernateProcessor.EXCLUDE, value = "org.hibernate.processor.test.includeexclude.F*")
void testQueryMethod() {
assertNoMetamodelClassGeneratedFor( Foo.class );
assertMetamodelClassGeneratedFor( Bar.class );
assertNoMetamodelClassGeneratedFor( Baz.class );
}
}
|
hibernate/hibernate-orm | 1,109 | hibernate-core/src/main/java/org/hibernate/type/descriptor/jdbc/LocalDateJdbcType.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.type.descriptor.jdbc;
import java.time.LocalDate;
import org.hibernate.type.SqlTypes;
import org.hibernate.type.descriptor.java.JavaType;
import org.hibernate.type.descriptor.jdbc.internal.AbstractJavaTimeJdbcType;
import org.hibernate.type.descriptor.jdbc.internal.JdbcLiteralFormatterTemporal;
import jakarta.persistence.TemporalType;
/**
* Descriptor for handling {@linkplain LocalDate} directly through the JDBC driver
*
* @author Steve Ebersole
*/
public class LocalDateJdbcType extends AbstractJavaTimeJdbcType<LocalDate> {
public static LocalDateJdbcType INSTANCE = new LocalDateJdbcType();
public LocalDateJdbcType() {
super( LocalDate.class );
}
@Override
public int getJdbcTypeCode() {
return SqlTypes.LOCAL_DATE;
}
@Override
public int getDdlTypeCode() {
return SqlTypes.DATE;
}
@Override
public <T> JdbcLiteralFormatter<T> getJdbcLiteralFormatter(JavaType<T> javaType) {
return new JdbcLiteralFormatterTemporal<>( javaType, TemporalType.DATE );
}
}
|
hibernate/hibernate-orm | 1,109 | hibernate-core/src/main/java/org/hibernate/type/descriptor/jdbc/LocalTimeJdbcType.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.type.descriptor.jdbc;
import java.time.LocalTime;
import org.hibernate.type.SqlTypes;
import org.hibernate.type.descriptor.java.JavaType;
import org.hibernate.type.descriptor.jdbc.internal.AbstractJavaTimeJdbcType;
import org.hibernate.type.descriptor.jdbc.internal.JdbcLiteralFormatterTemporal;
import jakarta.persistence.TemporalType;
/**
* Descriptor for handling {@linkplain LocalTime} directly through the JDBC driver
*
* @author Steve Ebersole
*/
public class LocalTimeJdbcType extends AbstractJavaTimeJdbcType<LocalTime> {
public static LocalTimeJdbcType INSTANCE = new LocalTimeJdbcType();
public LocalTimeJdbcType() {
super( LocalTime.class );
}
@Override
public int getJdbcTypeCode() {
return SqlTypes.LOCAL_TIME;
}
@Override
public int getDdlTypeCode() {
return SqlTypes.TIME;
}
@Override
public <T> JdbcLiteralFormatter<T> getJdbcLiteralFormatter(JavaType<T> javaType) {
return new JdbcLiteralFormatterTemporal<>( javaType, TemporalType.TIME );
}
}
|
hibernate/hibernate-orm | 1,115 | hibernate-testing/src/main/java/org/hibernate/testing/RequiresDialectFeature.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.testing;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotation used to indicate that a test should be run only when the current dialect supports the
* specified feature.
*
* @author Hardy Ferentschik
* @deprecated Use JUnit Jupiter and {@link org.hibernate.testing.orm.junit.RequiresDialectFeature} instead.
*/
@Target({ ElementType.METHOD, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Deprecated(forRemoval = true)
public @interface RequiresDialectFeature {
/**
* @return Class which checks the necessary dialect feature
*/
Class<? extends DialectCheck>[] value();
/**
* Comment describing the reason why the feature is required.
*
* @return The comment
*/
String comment() default "";
/**
* The key of a JIRA issue which relates this this feature requirement.
*
* @return The jira issue key
*/
String jiraKey() default "";
}
|
hibernate/hibernate-orm | 1,127 | hibernate-core/src/main/java/org/hibernate/query/sqm/SqmJoinable.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.query.sqm;
import org.hibernate.query.hql.spi.SqmCreationState;
import org.hibernate.query.sqm.spi.SqmCreationHelper;
import org.hibernate.query.sqm.tree.SqmJoinType;
import org.hibernate.query.sqm.tree.domain.SqmPath;
import org.hibernate.query.sqm.tree.from.SqmFrom;
import org.hibernate.query.sqm.tree.from.SqmJoin;
import org.hibernate.spi.NavigablePath;
/**
* Specialization for attributes that that can be used in creating SQM joins
*
* todo (6.0) : should we define this for entities as well to handle cross joins and "entity joins"?
* - the result type would need to change to just SqmJoin...
*
* @author Steve Ebersole
*/
public interface SqmJoinable<O, E> {
SqmJoin<O, E> createSqmJoin(
SqmFrom<?, O> lhs,
SqmJoinType joinType,
String alias,
boolean fetched,
SqmCreationState creationState);
String getName();
default NavigablePath createNavigablePath(SqmPath<?> parent, String alias) {
return SqmCreationHelper.buildSubNavigablePath( parent, getName(), alias );
}
}
|
hibernate/hibernate-search | 1,072 | documentation/src/test/java/org/hibernate/search/documentation/mapper/orm/binding/namedpredicate/ItemStock.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.documentation.mapper.orm.binding.namedpredicate;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.PropertyBinderRef;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.PropertyBinding;
// tag::include[]
@Entity
@Indexed
public class ItemStock {
@Id
@PropertyBinding(binder = @PropertyBinderRef(type = SkuIdentifierBinder.class)) // <1>
private String skuId;
private int amountInStock;
// Getters and setters
// ...
// tag::getters-setters[]
public String getSkuId() {
return skuId;
}
public void setSkuId(String skuId) {
this.skuId = skuId;
}
public int getAmountInStock() {
return amountInStock;
}
public void setAmountInStock(int amountInStock) {
this.amountInStock = amountInStock;
}
// end::getters-setters[]
}
// end::include[]
|
openjdk/jdk8 | 1,157 | langtools/test/com/sun/javadoc/testNewLanguageFeatures/pkg/TypeParameterSubClass.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class TypeParameterSubClass<T extends String> extends TypeParameterSuperClass<T> {}
|
openjdk/jdk8 | 1,163 | langtools/test/com/sun/javadoc/testBreakIterator/pkg/BreakIteratorTest.java | /*
* Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
/**
* The class is empty (i.e. it has no members).
*/
public class BreakIteratorTest {
}
|
openjdk/jdk8 | 1,168 | langtools/test/tools/javadoc/generics/genericInnerAndOuter/pkg1/O.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
public class O<T> {
public class I<S> {
public void m1(O<String>.I<Number> a) {}
}
}
|
openjdk/jdk8 | 1,169 | langtools/test/tools/javac/diags/examples/BreakOutsideSwitchLoop.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.break.outside.switch.loop
class BreakOutsideSwitchLoop {
void m() {
break;
}
}
|
openjdk/jdk8 | 1,169 | langtools/test/tools/javac/diags/examples/NativeMethodCantHaveBody.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.native.meth.cant.have.body
abstract class NativeMethodCantHaveBody {
native void m() { }
}
|
openjdk/jdk8 | 1,171 | langtools/test/tools/javac/defaultMethods/crossCompile/Clinit.java | /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
interface Clinit {
String s = Inner.m();
static class Inner {
static String m() { return ""; }
}
}
|
openjdk/jdk8 | 1,171 | langtools/test/tools/javac/diags/examples/OperatorCantBeApplied.java | /*
* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.operator.cant.be.applied
class OperatorCantBeApplied {
String s = null;
{ s++; }
}
|
openjdk/jdk8 | 1,176 | langtools/test/tools/javac/diags/examples/UnclosedComment.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.unclosed.comment
// key: compiler.err.premature.eof
class UnclosedComment {
/*
void m() { }
}
|
openjdk/jdk8 | 1,178 | langtools/test/tools/javac/diags/examples/MalformedFpLit.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.malformed.fp.lit
// key: compiler.err.illegal.start.of.expr
class MalformedFpLit {
float f = 0e*;
}
|
openjdk/jtreg | 1,176 | test/modlibs/compileAction/usermods/um1/um1_p1/um1_p1_C.java | /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package um1_p1;
public class um1_p1_C {
public void run() {
System.out.println(getClass().getName());
}
}
|
openjdk/jtreg | 1,176 | test/modlibs/compileAction/usermods/um2/um2_p1/um2_p1_C.java | /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package um2_p1;
public class um2_p1_C {
public void run() {
System.out.println(getClass().getName());
}
}
|
openjdk/jtreg | 1,202 | test/extra-props/valid/Test1.java | /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @requires extra
*/
public class Test1 {
public static void main(String... args) {
// this test should be executed
}
}
|
oracle-samples/oracle-db-examples | 1,129 | java/hibernate-ucp/src/main/java/com/oracle/hibernate/ucp/HibernateUCPSample.java | package com.oracle.hibernate.ucp;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.boot.Metadata;
import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.jdbc.Work;
import java.sql.Connection;
import java.sql.SQLException;
public class HibernateUCPSample {
public static void main( String[] args ) throws HibernateException {
StandardServiceRegistry ssr = new StandardServiceRegistryBuilder().build();
Metadata meta = new MetadataSources(ssr).getMetadataBuilder().build();
SessionFactory factory = meta.getSessionFactoryBuilder().build();
Session session = factory.openSession();
session.doWork(new Work() {
public void execute(Connection con) throws SQLException {
// Prints the UCP proxy class, indicating that UCP is configured as a datasource
System.out.println("Connection class: " + con.getClass());
}
});
factory.close();
session.close();
}
}
|
oracle/nosql | 1,155 | kvmain/src/main/java/oracle/kv/impl/admin/plan/AbstractPlanWithTopology.java | /*-
* Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This file was distributed by Oracle as part of a version of Oracle NoSQL
* Database made available at:
*
* http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html
*
* Please see the LICENSE file included in the top-level directory of the
* appropriate version of Oracle NoSQL Database for a copy of the license and
* additional information.
*/
package oracle.kv.impl.admin.plan;
import oracle.kv.impl.topo.Topology;
import oracle.kv.impl.util.NonNullByDefault;
/** An {@link AbstractPlan} that includes a {@link Topology}. */
@NonNullByDefault
public abstract class AbstractPlanWithTopology extends AbstractPlan {
private static final long serialVersionUID = 1L;
protected final Topology topology;
protected AbstractPlanWithTopology(String name,
Planner planner,
Topology topology) {
super(name, planner);
this.topology = topology;
}
public Topology getTopology() {
return topology;
}
}
|
apache/commons-jcs | 1,123 | commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/behavior/RemoteType.java | package org.apache.commons.jcs3.auxiliary.remote.server.behavior;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* Enum to describe the mode of the remote cache
*/
public enum RemoteType
{
/** A remote cache is either a local cache or a cluster cache */
LOCAL,
/** A remote cache is either a local cache or a cluster cache */
CLUSTER
}
|
apache/curator | 1,150 | curator-x-async/src/main/java/org/apache/curator/x/async/modeled/ModeledOptions.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.curator.x.async.modeled;
public enum ModeledOptions {
/**
* Causes {@link ModeledFramework#children()} and {@link ModeledFramework#childrenAsZNodes()}
* to ignore {@link org.apache.zookeeper.KeeperException.NoNodeException} and merely return
* an empty list
*/
ignoreMissingNodesForChildren
}
|
apache/cxf | 1,111 | distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/hello2/HelloServiceImpl2.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package sample.rs.service.hello2;
import jakarta.ws.rs.Path;
import sample.rs.service.api.HelloService;
@Path("/sayHello2")
public class HelloServiceImpl2 implements HelloService {
public String sayHello(String a) {
return "Hello2 " + a + ", Welcome to CXF RS Spring Boot World!!!";
}
}
|
apache/cxf | 1,156 | rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/EchoImpl.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.ws.security.wss4j;
import jakarta.jws.WebService;
/**
* Service that echoes the username and password back to the user in an xml
* document
*/
@WebService(endpointInterface = "org.apache.cxf.ws.security.wss4j.Echo")
public class EchoImpl implements Echo {
public String echo(String text) {
return text;
}
}
|
apache/cxf | 1,161 | systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/RETRIEVE.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.systest.jaxrs;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import jakarta.ws.rs.HttpMethod;
@Target({ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@HttpMethod("RETRIEVE")
public @interface RETRIEVE {
}
|
apache/cxf | 1,167 | rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/Assertor.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.ws.policy;
import javax.xml.namespace.QName;
import org.apache.cxf.message.Message;
/**
* API used in the WS-Policy framework to allow a message exchange participant to
* assert its capabilities for the underlying message.
*/
public interface Assertor {
void assertMessage(Message message);
boolean canAssert(QName type);
}
|
apache/cxf | 1,168 | core/src/main/java/org/apache/cxf/configuration/Configurable.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.configuration;
/**
* A configurable interface for obtaining a bean's name
*
* A class which implements this interface should return the
* unique bean name for configuration to use
*/
public interface Configurable {
/**
* Get the configurable object's Bean name
* @return the bean name
*/
String getBeanName();
}
|
apache/dolphinscheduler | 1,085 | dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/model/SwitchResultVo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.plugin.task.api.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SwitchResultVo {
private String condition;
private Long nextNode;
}
|
apache/dolphinscheduler | 1,097 | dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskChannel.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.plugin.task.api;
import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;
public interface TaskChannel {
AbstractTask createTask(TaskExecutionContext taskRequest);
AbstractParameters parseParameters(String taskParams);
}
|
apache/druid | 1,155 | sql/src/main/java/org/apache/druid/sql/calcite/rel/logical/DruidLogicalNode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.sql.calcite.rel.logical;
import org.apache.calcite.rel.RelNode;
/**
* An interface to mark {@link RelNode} as Druid physical nodes. These physical nodes look a lot same as their logical
* counterparts in Calcite, but they do follow a different costing model.
*/
public interface DruidLogicalNode extends RelNode
{
}
|
apache/eagle | 1,125 | eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/SparkRunningJobAppProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.jpm.spark.running;
import org.apache.eagle.app.spi.AbstractApplicationProvider;
public class SparkRunningJobAppProvider extends AbstractApplicationProvider<SparkRunningJobApp> {
@Override
public SparkRunningJobApp getApplication() {
return new SparkRunningJobApp();
}
}
|
apache/eagle | 1,138 | eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/messaging/StormStreamSource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.app.messaging;
import backtype.storm.topology.base.BaseRichSpout;
import org.apache.eagle.metadata.model.StreamSinkConfig;
import org.apache.eagle.metadata.model.StreamSourceConfig;
public abstract class StormStreamSource<T extends StreamSourceConfig> extends BaseRichSpout implements StreamSource<T> {
} |
apache/eventmesh | 1,128 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/redis/RedisSinkConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.config.connector.redis;
import org.apache.eventmesh.common.config.connector.SinkConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class RedisSinkConfig extends SinkConfig {
public SinkConnectorConfig connectorConfig;
}
|
apache/eventmesh | 1,130 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/lark/LarkSinkConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.config.connector.lark;
import org.apache.eventmesh.common.config.connector.SinkConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class LarkSinkConfig extends SinkConfig {
public SinkConnectorConfig sinkConnectorConfig;
}
|
apache/felix-dev | 1,076 | ipojo/runtime/core-it/ipojo-core-configuration-admin-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.ipojo.runtime.core.services;
import java.util.Properties;
public interface FooService {
boolean foo();
Properties fooProps();
Boolean getObject();
boolean getBoolean();
int getInt();
long getLong();
double getDouble();
}
|
apache/felix-dev | 1,078 | ipojo/runtime/composite-it/ipojo-composite-runtime-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/BazService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.ipojo.runtime.core.services;
import java.util.Properties;
public interface BazService {
boolean foo();
Properties fooProps();
Boolean getObject();
boolean getBoolean();
int getInt();
long getLong();
double getDouble();
}
|
apache/felix-dev | 1,078 | ipojo/runtime/composite-it/ipojo-composite-runtime-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.ipojo.runtime.core.services;
import java.util.Properties;
public interface FooService {
boolean foo();
Properties fooProps();
Boolean getObject();
boolean getBoolean();
int getInt();
long getLong();
double getDouble();
}
|
apache/felix-dev | 1,078 | ipojo/runtime/core-it/ipojo-core-service-providing-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.ipojo.runtime.core.services;
import java.util.Properties;
public interface FooService {
boolean foo();
Properties fooProps();
Boolean getObject();
boolean getBoolean();
int getInt();
long getLong();
double getDouble();
}
|
apache/fesod | 1,159 | fesod/src/main/java/org/apache/fesod/excel/event/NotRepeatExecutor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fesod.excel.event;
/**
* There are multiple interceptors that execute only one of them when fired once.If you want to control which one to
* execute please use {@link Order}
*
*
**/
public interface NotRepeatExecutor {
/**
* To see if it's the same executor
*
* @return
*/
String uniqueValue();
}
|
apache/fineract | 1,125 | fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/TenantDetailsService.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.core.service.tenant;
import java.util.List;
import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant;
public interface TenantDetailsService {
FineractPlatformTenant loadTenantById(String tenantId);
List<FineractPlatformTenant> findAllTenants();
}
|
apache/fineract | 1,128 | fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ChargePaymentDTO.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.accounting.journalentry.data;
import java.math.BigDecimal;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Getter
public class ChargePaymentDTO {
private final Long chargeId;
private final BigDecimal amount;
private final Long loanChargeId;
}
|
apache/fineract | 1,128 | fineract-provider/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingWritePlatformService.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.mix.service;
import org.apache.fineract.infrastructure.core.api.JsonCommand;
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
public interface MixTaxonomyMappingWritePlatformService {
CommandProcessingResult updateMapping(Long mappingId, JsonCommand command);
}
|
apache/fineract | 1,137 | fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/SqlValidator.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.security.service;
import org.apache.fineract.infrastructure.security.exception.SqlValidationException;
public interface SqlValidator {
void validate(String statement) throws SqlValidationException;
void validate(String profile, String statement) throws SqlValidationException;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.