repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/iceberg | 1,143 | api/src/main/java/org/apache/iceberg/UpdateLocation.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.iceberg;
/** API for setting a table's or view's base location. */
public interface UpdateLocation extends PendingUpdate<String> {
/**
* Set the table's or view's location.
*
* @param location a String location
* @return this for method chaining
*/
UpdateLocation setLocation(String location);
}
|
apache/ignite-3 | 1,102 | modules/table/src/test/java/org/apache/ignite/internal/table/distributed/BitSetPartitionSetTest.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.ignite.internal.table.distributed;
/** Tests of the {@link BitSetPartitionSet} implementation of {@link PartitionSet}. */
class BitSetPartitionSetTest extends AbstractPartitionSetTest {
@Override
PartitionSet createSet() {
return new BitSetPartitionSet();
}
}
|
apache/ignite-3 | 1,116 | modules/compute/src/jobs/java/org/apache/ignite/internal/compute/NonComputeJob.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.ignite.internal.compute;
import org.apache.ignite.compute.JobExecutionContext;
/** A class which doesn't implement {@link org.apache.ignite.compute.ComputeJob}. */
public class NonComputeJob {
public String execute(JobExecutionContext context, Object... args) {
return "";
}
}
|
apache/ignite-3 | 1,123 | modules/raft/src/main/java/org/apache/ignite/raft/jraft/Lifecycle.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.ignite.raft.jraft;
/**
* Service life cycle mark interface.
*/
public interface Lifecycle<T> {
/**
* Initialize the service.
*
* @return true when successes.
*/
boolean init(final T opts);
/**
* Dispose the resources for service.
*/
void shutdown();
}
|
apache/ignite | 1,078 | modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOnheapSelfTest.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.ignite.internal.processors.cache.distributed.dht;
/** */
public class GridCacheDhtPreloadOnheapSelfTest extends GridCacheDhtPreloadSelfTest {
/** {@inheritDoc} */
@Override protected boolean onheapCacheEnabled() {
return true;
}
}
|
apache/ignite | 1,113 | modules/core/src/main/java/org/apache/ignite/stream/socket/SocketMessageConverter.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.ignite.stream.socket;
/**
* Socket message converter.
*/
public interface SocketMessageConverter<T> {
/**
* Converter message represented by array of bytes to object.
*
* @param msg Message.
* @return Converted object.
*/
public T convert(byte[] msg);
}
|
apache/ignite | 1,122 | modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/NodeFilter.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.ignite.tests.p2p;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.lang.IgnitePredicate;
/**
*
*/
public class NodeFilter implements IgnitePredicate<ClusterNode> {
/** {@inheritDoc} */
@Override public boolean apply(ClusterNode node) {
return true;
}
}
|
apache/impala | 1,121 | java/test-hive-udfs/src/main/java/org/apache/impala/UtilForUdfConstructor.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.impala;
import java.text.ParseException;
import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.io.Text;
/** IMPALA-11342 regression test: Helper for ImportNearbyClasses. */
public class UtilForUdfConstructor extends UDF {
public static String getHello() {
return "Hello";
}
}
|
apache/incubator-brooklyn | 1,102 | brooklyn-server/api/src/main/java/org/apache/brooklyn/api/location/LocationType.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.brooklyn.api.location;
import org.apache.brooklyn.api.objs.BrooklynType;
import com.google.common.annotations.Beta;
/**
* Gives type information for a {@link Location}. It is immutable.
* @since 0.7.0
*/
@Beta
public interface LocationType extends BrooklynType {
}
|
apache/incubator-hivemall | 1,125 | core/src/main/java/hivemall/annotations/VisibleForTesting.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 hivemall.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Annotates a program element that is only for use in test codes.
*/
@Retention(RetentionPolicy.CLASS)
@Documented
public @interface VisibleForTesting {
}
|
apache/incubator-kie-drools | 1,067 | drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/drl/StaticMethods.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.drools.compiler.integrationtests.drl;
public class StaticMethods {
public static String getString1(final String string) {
return string;
}
public static String getString2(final String string) {
return string;
}
}
|
apache/incubator-kie-drools | 1,075 | drools-serialization-protobuf/src/main/java/org/drools/serialization/protobuf/marshalling/InternalMarshaller.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.drools.serialization.protobuf.marshalling;
import org.kie.api.marshalling.Marshaller;
public interface InternalMarshaller extends Marshaller {
KieSessionInitializer getInitializer();
void setInitializer( KieSessionInitializer initializer );
}
|
apache/incubator-kie-drools | 1,109 | drools-templates/src/main/java/org/drools/template/parser/BooleanCell.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.drools.template.parser;
/**
* A cell in a decision table containing a long value
*/
public class BooleanCell extends AbstractCell<Boolean> {
BooleanCell(Row r, Column c) {
super(r, c);
}
public void setValue(String v) {
value = Boolean.valueOf(v);
}
}
|
apache/incubator-kie-kogito-apps | 1,069 | jobs-service/jobs-service-mongodb/src/test/java/org/kie/kogito/jobs/service/messaging/MongoDBMessagingApiTest.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.kie.kogito.jobs.service.messaging;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
@QuarkusTest
@TestProfile(MongoDBEventSupportTestProfile.class)
class MongoDBMessagingApiTest extends BaseMessagingApiTest {
}
|
apache/incubator-kie-kogito-runtimes | 1,104 | jbpm/jbpm-tests/src/main/java/org/jbpm/bpmn2/services/Interface1.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.jbpm.bpmn2.services;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Interface1 {
Logger LOGGER = LoggerFactory.getLogger(Interface1.class);
public void operation1(String value) {
LOGGER.info("operation1 in interface1 = {}", value);
}
}
|
apache/incubator-kie-optaplanner-quickstarts | 1,051 | use-cases/maintenance-scheduling/src/main/java/org/acme/maintenancescheduling/domain/WorkCalendar.java | package org.acme.maintenancescheduling.domain;
import java.time.LocalDate;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
@Entity
public class WorkCalendar {
@Id
@GeneratedValue
private Long id;
private LocalDate fromDate; // Inclusive
private LocalDate toDate; // Exclusive
// No-arg constructor required for Hibernate
public WorkCalendar() {
}
public WorkCalendar(LocalDate fromDate, LocalDate toDate) {
this.fromDate = fromDate;
this.toDate = toDate;
}
@Override
public String toString() {
return fromDate + " - " + toDate;
}
// ************************************************************************
// Getters and setters
// ************************************************************************
public Long getId() {
return id;
}
public LocalDate getFromDate() {
return fromDate;
}
public LocalDate getToDate() {
return toDate;
}
}
|
apache/incubator-kie-optaplanner | 1,080 | optaplanner-benchmark/src/main/java/org/optaplanner/benchmark/impl/statistic/StatisticType.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.optaplanner.benchmark.impl.statistic;
public interface StatisticType {
/**
* @return never null
*/
String name();
/**
* @return never null
*/
default String getLabel() {
return name().replace('_', ' ');
}
}
|
apache/incubator-retired-wave | 1,096 | wave/src/main/java/org/waveprotocol/wave/client/wavepanel/view/dom/full/DomRenderer.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.waveprotocol.wave.client.wavepanel.view.dom.full;
import com.google.gwt.dom.client.Element;
import org.waveprotocol.wave.client.render.WaveRenderer;
/**
* A wave renderer that renders into DOM elements.
*/
public interface DomRenderer extends WaveRenderer<Element> {
}
|
apache/incubator-seata-samples | 1,065 | at-sample/springboot-mybatis-seata/src/main/java/org/apache/seata/service/StorageService.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.seata.service;
/**
* The interface Stock service.
*/
public interface StorageService {
/**
* 扣减库存
*
* @param commodityCode 商品编号
* @param count 扣减数量
*/
void deduct(String commodityCode, int count);
}
|
apache/inlong | 1,085 | inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/sink/IDecoderBuilder.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.inlong.sort.standalone.sink;
import org.apache.inlong.common.pojo.sort.dataflow.SourceConfig;
import org.apache.inlong.sdk.transform.decode.SourceDecoder;
public interface IDecoderBuilder {
SourceDecoder<String> createSourceDecoder(SourceConfig sourceConfig);
}
|
apache/inlong | 1,105 | inlong-common/src/main/java/org/apache/inlong/common/pojo/sort/dataflow/field/FieldConfig.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.inlong.common.pojo.sort.dataflow.field;
import org.apache.inlong.common.pojo.sort.dataflow.field.format.FormatInfo;
import lombok.Data;
import java.io.Serializable;
@Data
public class FieldConfig implements Serializable {
private String name;
private FormatInfo formatInfo;
}
|
apache/iotdb-extras | 1,103 | connectors/hadoop/src/test/java/org/apache/iotdb/hadoop/tsfile/constant/TestConstant.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.iotdb.hadoop.tsfile.constant;
import java.io.File;
public class TestConstant {
public static final String BASE_OUTPUT_PATH = "target".concat(File.separator);
public static final String OUTPUT_DATA_DIR =
BASE_OUTPUT_PATH.concat("data").concat(File.separator);
}
|
apache/iotdb | 1,110 | iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/QueryType.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.iotdb.db.queryengine.plan.analyze;
public enum QueryType {
WRITE,
READ,
// Currently READ_WRITE is only used by insert into query, which means it behaves as a READ query
// type. However, the protocol layer regards it as WRITE operation when it returns.
READ_WRITE,
}
|
apache/jackrabbit-oak | 1,124 | oak-run/src/main/java/org/apache/jackrabbit/oak/run/TikaCommand.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.jackrabbit.oak.run;
import org.apache.jackrabbit.oak.run.commons.Command;
import org.apache.jackrabbit.oak.plugins.tika.TextExtractorMain;
class TikaCommand implements Command {
@Override
public void execute(String... args) throws Exception {
TextExtractorMain.main(args);
}
}
|
apache/jackrabbit | 1,085 | test/compatibility/create20/src/test/java/org/apache/jackrabbit/harness/compatibility/CreateRepositoryTest.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.jackrabbit.harness.compatibility;
import org.testng.annotations.Test;
public class CreateRepositoryTest extends AbstractRepositoryTest {
@Test
public void createRepositories() throws Exception {
doCreateRepositories("jackrabbit-2.0");
}
}
|
apache/jackrabbit | 1,085 | test/compatibility/create21/src/test/java/org/apache/jackrabbit/harness/compatibility/CreateRepositoryTest.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.jackrabbit.harness.compatibility;
import org.testng.annotations.Test;
public class CreateRepositoryTest extends AbstractRepositoryTest {
@Test
public void createRepositories() throws Exception {
doCreateRepositories("jackrabbit-2.1");
}
}
|
apache/jackrabbit | 1,085 | test/compatibility/create22/src/test/java/org/apache/jackrabbit/harness/compatibility/CreateRepositoryTest.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.jackrabbit.harness.compatibility;
import org.testng.annotations.Test;
public class CreateRepositoryTest extends AbstractRepositoryTest {
@Test
public void createRepositories() throws Exception {
doCreateRepositories("jackrabbit-2.2");
}
}
|
apache/jackrabbit | 1,085 | test/compatibility/create24/src/test/java/org/apache/jackrabbit/harness/compatibility/CreateRepositoryTest.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.jackrabbit.harness.compatibility;
import org.testng.annotations.Test;
public class CreateRepositoryTest extends AbstractRepositoryTest {
@Test
public void createRepositories() throws Exception {
doCreateRepositories("jackrabbit-2.4");
}
}
|
apache/jackrabbit | 1,085 | test/compatibility/create26/src/test/java/org/apache/jackrabbit/harness/compatibility/CreateRepositoryTest.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.jackrabbit.harness.compatibility;
import org.testng.annotations.Test;
public class CreateRepositoryTest extends AbstractRepositoryTest {
@Test
public void createRepositories() throws Exception {
doCreateRepositories("jackrabbit-2.6");
}
}
|
apache/jena | 1,113 | jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/QueryScopeException.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.jena.sparql.syntax.syntaxtransform;
import org.apache.jena.query.QueryException;
public class QueryScopeException extends QueryException {
public QueryScopeException(String msg) { super(msg) ; }
public QueryScopeException(String msg, Throwable cause) { super(msg, cause) ; }
}
|
apache/jena | 1,117 | jena-db/jena-dboe-base/src/test/java/org/apache/jena/dboe/base/block/TS_Block.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.jena.dboe.base.block;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;
@Suite
@SelectClasses({
TestBlockMgrMem.class
, TestBlockMgrDirect.class
, TestBlockMgrMapped.class
, TestBlockMgrTracked.class
})
public class TS_Block
{}
|
apache/jena | 1,127 | jena-base/src/main/java/org/apache/jena/atlas/iterator/FilterUnique.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.jena.atlas.iterator;
import java.util.HashSet;
import java.util.Set;
import java.util.function.Predicate;
public class FilterUnique<T> implements Predicate<T> {
private final Set<T> seen = new HashSet<>();
@Override
public boolean test(T item) {
return seen.add(item);
}
}
|
apache/jena | 1,132 | jena-tdb1/src/main/java/org/apache/jena/tdb1/setup/TupleIndexBuilder.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.jena.tdb1.setup;
import org.apache.jena.tdb1.base.file.FileSet;
import org.apache.jena.tdb1.lib.ColumnMap;
import org.apache.jena.tdb1.store.tupletable.TupleIndex;
public interface TupleIndexBuilder {
TupleIndex buildTupleIndex(FileSet fileSet, ColumnMap colMap, String name, StoreParams params) ;
}
|
apache/johnzon | 1,121 | johnzon-mapper/src/main/java/org/apache/johnzon/mapper/TypeAwareAdapter.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.johnzon.mapper;
import org.apache.johnzon.mapper.internal.AdapterKey;
import java.lang.reflect.Type;
public interface TypeAwareAdapter<A, B> extends Adapter<A, B> {
Type getTo();
Type getFrom();
default AdapterKey getKey() {
return new AdapterKey(getFrom(), getTo());
}
}
|
apache/juneau | 1,107 | juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/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.
*/
/**
* JSON Schema Data Transfer Objects
*
* <p>
* This package contains predefined DTOs for working with JSON Schema definitions.
* These classes provide a convenient way to serialize and parse JSON Schema content
* using Juneau's marshalling framework.
* </p>
*/
package org.apache.juneau.bean.jsonschema;
|
apache/kafka | 1,109 | streams/test-utils/src/test/java/org/apache/kafka/streams/TopologyTestDriverAtLeastOnceTest.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.kafka.streams;
import java.util.Collections;
public class TopologyTestDriverAtLeastOnceTest extends TopologyTestDriverTest {
TopologyTestDriverAtLeastOnceTest() {
super(Collections.singletonMap(StreamsConfig.PROCESSING_GUARANTEE_CONFIG, StreamsConfig.AT_LEAST_ONCE));
}
}
|
apache/kafka | 1,123 | clients/src/main/java/org/apache/kafka/common/serialization/ShortSerializer.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.kafka.common.serialization;
public class ShortSerializer implements Serializer<Short> {
public byte[] serialize(String topic, Short data) {
if (data == null)
return null;
return new byte[] {
(byte) (data >>> 8),
data.byteValue()
};
}
} |
apache/kafka | 1,128 | server-common/src/main/java/org/apache/kafka/server/common/OffsetAndEpoch.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.kafka.server.common;
public record OffsetAndEpoch(long offset, int epoch) implements Comparable<OffsetAndEpoch> {
@Override
public int compareTo(OffsetAndEpoch o) {
if (epoch == o.epoch)
return Long.compare(offset, o.offset);
return Integer.compare(epoch, o.epoch);
}
} |
apache/kafka | 1,137 | clients/src/main/java/org/apache/kafka/common/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.kafka.common;
import java.util.Map;
/**
* A Mix-in style interface for classes that are instantiated by reflection and need to take configuration parameters
*/
public interface Configurable {
/**
* Configure this class with the given key-value pairs
*/
void configure(Map<String, ?> configs);
}
|
apache/lens | 1,117 | lens-server/src/test/java/org/apache/lens/server/api/metrics/LensMetricsUtil.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.lens.server.api.metrics;
/**
* The Class LensMetricsUtil.
*/
public final class LensMetricsUtil {
private LensMetricsUtil() {
}
/** This is called in restart tests to clear static registry*/
public static void clearRegistry() {
LensMetricsRegistry.clearRegistry();
}
}
|
apache/linkis | 1,049 | linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/java/org/apache/linkis/manager/am/service/EngineConnPidCallbackService.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.linkis.manager.am.service;
import org.apache.linkis.governance.common.protocol.task.ResponseEngineConnPid;
@FunctionalInterface
public interface EngineConnPidCallbackService {
void dealPid(ResponseEngineConnPid protocol);
}
|
apache/manifoldcf | 1,084 | framework/connector-common/src/main/java/org/apache/manifoldcf/connectorcommon/jsongen/JSONIntegerReader.java | /* $Id$ */
/**
* 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.manifoldcf.connectorcommon.jsongen;
import java.io.*;
/** This class describes a JSON integer reader. */
public class JSONIntegerReader extends JSONValueReader
{
public JSONIntegerReader(int value)
{
super(new StringReader(Integer.toString(value)));
}
}
|
apache/manifoldcf | 1,100 | connectors/filenet/build-stub/src/main/java/com/filenet/api/security/DiscretionaryPermission.java | /* $Id$ */
/**
* 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 com.filenet.api.security;
import com.filenet.api.constants.AccessType;
import com.filenet.api.core.DependentObject;
/** Stub interface to allow the connector to build fully.
*/
public interface DiscretionaryPermission extends Permission, DependentObject
{
public AccessType get_AccessType();
}
|
apache/maven-build-cache-extension | 1,114 | src/test/java/org/apache/maven/buildcache/its/junit/BeforeEach.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.maven.buildcache.its.junit;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface BeforeEach {}
|
apache/maven-dependency-plugin | 1,118 | src/it/projects/analyze-excluded-classes/src/main/java/Main.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.
*/
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.metadata.Metadata;
import org.apache.maven.model.Model;
public class Main
{
public static final String SCOPE_COMPILE = Artifact.SCOPE_COMPILE;
public Model model = null;
public Metadata metadata = null;
}
|
apache/maven-javadoc-plugin | 1,103 | src/it/projects/MJAVADOC-620_no-dot-in-version/app/src/main/java/TestUsage.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.
*/
import somepackage.Test;
/**
* Sample class that tries to use top-level class from a non-module JAR.
*/
public class TestUsage
{
/**
* Sample method that uses the top-level Test class from the other project.
*/
public Test getTest()
{
return new Test();
}
}
|
apache/maven-plugins | 1,109 | maven-site-plugin/src/it/emma-plugin-it/a/src/test/java/hello/HelloTest.java | package hello;
/*
* 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.
*/
import junit.framework.TestCase;
public class HelloTest extends TestCase
{
public void testHello()
{
final Hello hello = new Hello();
assertEquals( "Hello world!", hello.hello( null ) );
assertEquals( "Hello EMMA!", hello.hello( "EMMA" ) );
}
}
|
apache/maven | 1,130 | api/maven-api-xml/src/main/java/org/apache/maven/api/xml/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.
*/
/**
* Provides an immutable XML processing API for Maven, offering classes and interfaces
* for reading, manipulating, and writing XML documents in a thread-safe manner.
* This package is used extensively for POM, settings, and other Maven configuration files.
*
* @since 4.0.0
*/
package org.apache.maven.api.xml;
|
apache/mina-sshd | 1,103 | sshd-common/src/main/java/org/apache/sshd/client/config/keys/ClientIdentityLoaderManager.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.sshd.client.config.keys;
/**
* TODO Add javadoc
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public interface ClientIdentityLoaderManager extends ClientIdentityLoaderHolder {
void setClientIdentityLoader(ClientIdentityLoader loader);
}
|
apache/myfaces | 1,123 | impl/src/main/java/org/apache/myfaces/config/element/ContractMapping.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.myfaces.config.element;
import java.io.Serializable;
import java.util.List;
/**
*
* @author Leonardo Uribe
*/
public abstract class ContractMapping implements Serializable
{
public abstract List<String> getUrlPatternList();
public abstract List<String> getContractList();
}
|
apache/nifi | 1,044 | nifi-extension-bundles/nifi-snowflake-bundle/nifi-snowflake-services-api/src/main/java/org/apache/nifi/processors/snowflake/SnowflakeConnectionProviderService.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.nifi.processors.snowflake;
import org.apache.nifi.controller.ControllerService;
public interface SnowflakeConnectionProviderService extends ControllerService {
SnowflakeConnectionWrapper getSnowflakeConnection();
}
|
apache/nifi | 1,101 | nifi-toolkit/nifi-toolkit-client/src/main/java/org/apache/nifi/toolkit/client/NiFiClientException.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.nifi.toolkit.client;
public class NiFiClientException extends Exception {
public NiFiClientException(final String message) {
super(message);
}
public NiFiClientException(final String message, final Throwable cause) {
super(message, cause);
}
}
|
apache/oodt | 1,109 | filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/query/conv/VersionConverter.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.oodt.cas.filemgr.structs.query.conv;
/**
*
* @author bfoster
* @version $Revision$
*
* <p>
* An interface for converting a String version into a priority number
* <p>
*/
public interface VersionConverter {
double convertToPriority(String version) throws Exception;
}
|
apache/oodt | 1,113 | resource/src/main/java/org/apache/oodt/cas/resource/monitor/MonitorFactory.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.oodt.cas.resource.monitor;
/**
* @author woollard
* @version $Revision$
*
* <p>
* Creates new {@link Monitor} implementations.
* </p>
*
*/
public interface MonitorFactory {
/**
* @return A new implementation of the {@link Monitor} interface.
*/
Monitor createMonitor();
}
|
apache/openwebbeans | 1,083 | webbeans-impl/src/test/java/org/apache/webbeans/test/component/pfield/ProducerFieldDefinitionParameterized.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.webbeans.test.component.pfield;
import java.util.ArrayList;
import java.util.List;
import jakarta.enterprise.inject.Produces;
public class ProducerFieldDefinitionParameterized
{
private @Produces
List<Double> producedList = new ArrayList<Double>();
}
|
apache/openwebbeans | 1,095 | webbeans-impl/src/test/java/org/apache/webbeans/test/component/inject/generic/GenericComponent.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.webbeans.test.component.inject.generic;
import org.apache.webbeans.test.component.inject.parametrized.Persistent;
public class GenericComponent<T extends Persistent> extends SuperGenericComponent<T>
{
public void paramFunction(T paramInstance)
{
}
}
|
apache/openwebbeans | 1,106 | webbeans-el22/src/main/java/org/apache/webbeans/el22/WrappedValueExpressionNode.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.webbeans.el22;
public class WrappedValueExpressionNode
{
private final String fqBeanName;
public WrappedValueExpressionNode(final String fqBeanName)
{
this.fqBeanName = fqBeanName;
}
public String getFqBeanName()
{
return fqBeanName;
}
}
|
apache/paimon | 1,138 | paimon-core/src/main/java/org/apache/paimon/lookup/State.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.paimon.lookup;
import java.io.IOException;
/** Interface that different types of state must implement. */
public interface State<K, V> {
byte[] serializeKey(K key) throws IOException;
byte[] serializeValue(V value) throws IOException;
V deserializeValue(byte[] valueBytes) throws IOException;
}
|
apache/pdfbox | 1,138 | fontbox/src/main/java/org/apache/fontbox/EncodedFont.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.fontbox;
import org.apache.fontbox.encoding.Encoding;
/**
* A PostScript font which uses an encoding vector.
*
* @author John Hewson
*/
public interface EncodedFont
{
/**
* Returns the PostScript Encoding vector for the font.
*
* @return the encoding
*/
Encoding getEncoding();
}
|
apache/pekko-connectors | 1,132 | slick/src/test/java/docs/javadsl/User.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* license agreements; and to You under the Apache License, version 2.0:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* This file is part of the Apache Pekko project, which was derived from Akka.
*/
/*
* Copyright (C) since 2016 Lightbend Inc. <https://www.lightbend.com>
*/
package docs.javadsl;
public class User {
public final Integer id;
public final String name;
public User(Integer _id, String _name) {
id = _id;
name = _name;
}
@Override
public int hashCode() {
int hash = 3;
hash = 53 * hash + (this.name != null ? this.name.hashCode() : 0);
hash = 53 * hash + this.id;
return hash;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (!User.class.isAssignableFrom(obj.getClass())) {
return false;
}
final User other = (User) obj;
if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
return false;
}
if (this.id != other.id) {
return false;
}
return true;
}
}
|
apache/plc4x | 1,116 | plc4j/api/src/main/java/org/apache/plc4x/java/api/exceptions/PlcTagRangeException.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
*
* 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.
*/
package org.apache.plc4x.java.api.exceptions;
public class PlcTagRangeException extends PlcRuntimeException {
public PlcTagRangeException(int maxIndex, int requestedIndex) {
super(String.format("requested index of %d is outside the valid range of 0 - %d", requestedIndex, maxIndex));
}
}
|
apache/plc4x | 1,127 | plc4j/spi/src/main/java/org/apache/plc4x/java/spi/messages/PlcPinger.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
*
* 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.
*/
package org.apache.plc4x.java.spi.messages;
import org.apache.plc4x.java.api.messages.PlcPingRequest;
import org.apache.plc4x.java.api.messages.PlcPingResponse;
import java.util.concurrent.CompletableFuture;
public interface PlcPinger {
CompletableFuture<PlcPingResponse> ping(PlcPingRequest pingRequest);
}
|
apache/polygene-java | 1,068 | libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/common/datatypes/DoublePrecision.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.polygene.library.sql.generator.grammar.common.datatypes;
/**
* This class represents {@code DOUBLE PRECISION} data type.
*
* @author Stanislav Muhametsin
*/
public interface DoublePrecision
extends SQLDataType
{
} |
apache/polygene-java | 1,087 | libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/RepositoryNotFoundException.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.polygene.library.restlet.crud;
public class RepositoryNotFoundException extends RuntimeException
{
public RepositoryNotFoundException( Class entityType )
{
super( "No repository found for " + entityType.getName() );
}
}
|
apache/polygene-java | 1,099 | core/runtime/src/test/java/org/apache/polygene/runtime/composite/TransientClassLoaderTest.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.polygene.runtime.composite;
public class TransientClassLoaderTest
{
public void givenTransientWhenLoadingClassExpectSubclassGenerated()
{
// new TransientClassLoader( getClass().getClassLoader() ).loadFragmentClass( mainType );
}
}
|
apache/polygene-java | 1,114 | core/runtime/src/test/java/org/apache/polygene/runtime/query/model/City.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.polygene.runtime.query.model;
import org.apache.polygene.api.common.Optional;
import org.apache.polygene.api.property.Property;
public interface City
extends Nameable
{
@Optional
Property<String> country();
@Optional
Property<String> county();
}
|
apache/pulsar-client-reactive | 1,065 | pulsar-client-reactive-adapter/src/main/java/org/apache/pulsar/reactive/client/adapter/ProducerCacheProviderFactory.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
*
* 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.
*/
package org.apache.pulsar.reactive.client.adapter;
import java.util.function.Supplier;
/**
* Interface to supply instances of {@link ProducerCacheProvider}.
*/
public interface ProducerCacheProviderFactory extends Supplier<ProducerCacheProvider> {
}
|
apache/qpid-broker-j | 1,084 | broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingDestination.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.qpid.server.protocol.v1_0;
import org.apache.qpid.server.message.MessageSource;
import org.apache.qpid.server.protocol.v1_0.type.Symbol;
public interface SendingDestination
{
Symbol[] getCapabilities();
MessageSource getMessageSource();
}
|
apache/qpid-broker-j | 1,109 | broker-core/src/main/java/org/apache/qpid/server/plugin/ConnectionPropertyEnricher.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.qpid.server.plugin;
import java.util.Map;
import org.apache.qpid.server.transport.AMQPConnection;
public interface ConnectionPropertyEnricher extends Pluggable
{
Map<String,Object> addConnectionProperties(AMQPConnection<?> connection, Map<String,Object> existingProperties);
}
|
apache/qpid | 1,109 | qpid/tools/src/java/qpid-qmf2/src/main/java/org/apache/qpid/qmf2/common/QmfType.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.qpid.qmf2.common;
/**
* An enum containing the QMF type code indicating a QMF object's data type
*
* @author Fraser Adams
*/
public enum QmfType
{
TYPE_VOID,
TYPE_BOOL,
TYPE_INT,
TYPE_FLOAT,
TYPE_STRING,
TYPE_MAP,
TYPE_LIST,
TYPE_UUID;
}
|
apache/royale-compiler | 1,111 | compiler/src/main/java/org/apache/royale/abc/visitors/NilMetadataVisitor.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.royale.abc.visitors;
import org.apache.royale.abc.semantics.Metadata;
/**
* An IMetadataVisitor that ignores its input as far as possible.
*/
public class NilMetadataVisitor implements IMetadataVisitor
{
@Override
public void visit(Metadata md)
{
}
}
|
apache/seatunnel | 1,047 | seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/serialize/index/IndexSerializer.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.seatunnel.connectors.seatunnel.elasticsearch.serialize.index;
import org.apache.seatunnel.api.table.type.SeaTunnelRow;
/** index is a variable */
public interface IndexSerializer {
String serialize(SeaTunnelRow row);
}
|
apache/servicecomb-saga-actuator | 1,094 | saga-core/src/main/java/org/apache/servicecomb/saga/core/TransactionAbortedException.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.saga.core;
public class TransactionAbortedException extends RuntimeException{
public TransactionAbortedException(Throwable throwable) {
super(throwable);
}
public TransactionAbortedException(String cause) {
super(cause);
}
}
|
apache/shardingsphere | 1,060 | kernel/data-pipeline/distsql/statement/src/main/java/org/apache/shardingsphere/data/pipeline/distsql/statement/PipelineRALStatement.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.data.pipeline.distsql.statement;
import org.apache.shardingsphere.distsql.statement.type.ral.FeaturedRALStatement;
/**
* Pipeline RAL statement.
*/
public interface PipelineRALStatement extends FeaturedRALStatement {
}
|
apache/shenyu | 1,111 | shenyu-admin/src/main/java/org/apache/shenyu/admin/service/AiProxyConnectionService.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.admin.service;
/**
* The interface Ai proxy connection service.
*/
public interface AiProxyConnectionService {
/**
* Refresh api keys by selector id.
*
* @param selectorId selector id
*/
void refreshApiKeysBySelectorId(String selectorId);
} |
apache/shiro | 1,107 | samples/aspectj/src/main/java/org/apache/shiro/samples/aspectj/bank/BankServiceException.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.shiro.samples.aspectj.bank;
public class BankServiceException extends Exception {
public BankServiceException(String aMessage) {
super(aMessage);
}
public BankServiceException(String aMessage, Throwable aCause) {
super(aMessage, aCause);
}
}
|
apache/sis | 1,101 | endorsed/src/org.apache.sis.feature/main/org/apache/sis/pending/geoapi/filter/DistanceOperatorName.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.sis.pending.geoapi.filter;
/**
* Placeholder for GeoAPI 3.1 interfaces (not yet released).
* Shall not be visible in public API, as it will be deleted after next GeoAPI release.
*/
@SuppressWarnings("doclint:missing")
public enum DistanceOperatorName {
BEYOND, WITHIN;
}
|
apache/skywalking | 1,083 | oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/input/TraceScopeCondition.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.oap.server.core.query.input;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Setter
@Getter
@ToString
public class TraceScopeCondition {
private String traceId;
private String segmentId;
private Integer spanId;
}
|
apache/skywalking | 1,092 | oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/StorageException.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.oap.server.core.storage;
public class StorageException extends Exception {
public StorageException(String message) {
super(message);
}
public StorageException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/storm | 1,126 | storm-core/src/jvm/org/apache/storm/testing/staticmocking/MockedZookeeper.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.storm.testing.staticmocking;
import org.apache.storm.zookeeper.Zookeeper;
public class MockedZookeeper implements AutoCloseable {
public MockedZookeeper(Zookeeper inst) {
Zookeeper.setInstance(inst);
}
@Override
public void close() throws Exception {
Zookeeper.resetInstance();
}
}
|
apache/syncope | 1,105 | core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Batch.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.entity;
import java.time.OffsetDateTime;
public interface Batch extends ProvidedKeyEntity {
OffsetDateTime getExpiryTime();
void setExpiryTime(OffsetDateTime expiryTime);
String getResults();
void setResults(String results);
}
|
apache/syncope | 1,109 | ext/scimv2/scim-rest-api/src/main/java/org/apache/syncope/ext/scimv2/api/data/SCIMBean.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.ext.scimv2.api.data;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.io.Serializable;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
abstract class SCIMBean implements Serializable {
private static final long serialVersionUID = 7604407251038024743L;
}
|
apache/tajo | 1,139 | tajo-common/src/main/java/org/apache/tajo/type/Varchar.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.type;
import com.google.common.collect.ImmutableList;
import static org.apache.tajo.common.TajoDataTypes.Type.VARCHAR;
public class Varchar extends ValueParamterizedType {
Varchar(int length) {
super(VARCHAR, ImmutableList.of(length));
}
public int length() {
return params.get(0);
}
}
|
apache/tapestry-5 | 1,091 | tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/AbstractTracer.java | // Copyright 2006, 2007 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.integration.app1.components;
import org.apache.tapestry5.MarkupWriter;
import org.apache.tapestry5.annotations.AfterRender;
import org.apache.tapestry5.annotations.BeginRender;
public abstract class AbstractTracer
{
@BeginRender
void begin(MarkupWriter writer)
{
writer.write("BEGIN-ABSTRACT-TRACER ");
}
@AfterRender
void after(MarkupWriter writer)
{
writer.write("AFTER-ABSTRACT-TRACER ");
}
}
|
apache/tapestry-5 | 1,104 | tapestry-core/src/main/java/org/apache/tapestry5/runtime/PageLifecycleAdapter.java | // Copyright 2010, 2012 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.runtime;
/**
* Empty implementation of the {@link PageLifecycleListener} interface.
*
* @deprecated in 5.3.4, as {@link PageLifecycleListener} has been deprecated
*/
public class PageLifecycleAdapter implements PageLifecycleListener
{
public void containingPageDidAttach()
{
}
public void containingPageDidDetach()
{
}
public void containingPageDidLoad()
{
}
public void restoreStateBeforePageAttach()
{
}
}
|
apache/tika | 1,117 | tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/PassbackFilter.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.pipes.core;
import java.io.Serializable;
import org.apache.tika.metadata.listfilter.MetadataListFilter;
/**
* Filter/Select some of the emitted output and pass it back to the client parser.
*/
public abstract class PassbackFilter extends MetadataListFilter implements Serializable {
}
|
apache/tomcat80 | 1,152 | java/org/apache/catalina/ha/ClusterMessage.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.catalina.ha;
import java.io.Serializable;
import org.apache.catalina.tribes.Member;
public interface ClusterMessage extends Serializable {
public Member getAddress();
public void setAddress(Member member);
public String getUniqueId();
public long getTimestamp();
public void setTimestamp(long timestamp);
}
|
apache/tomee | 1,116 | examples/cdi-interceptors/src/main/java/org/superbiz/cdi/AccessDeniedException.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.superbiz.cdi;
import jakarta.ejb.ApplicationException;
/**
* @version $Revision$ $Date$
*/
@ApplicationException
public class AccessDeniedException extends RuntimeException {
private static final long serialVersionUID = 1L;
public AccessDeniedException(String s) {
super(s);
}
}
|
apache/uniffle | 1,117 | client-spark/spark3/src/main/java/org/apache/spark/shuffle/Spark3VersionUtils.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.spark.shuffle;
import org.apache.spark.package$;
public class Spark3VersionUtils extends SparkVersionUtils {
public static final String SPARK_VERSION_SHORT = package$.MODULE$.SPARK_VERSION_SHORT();
public static boolean isSpark320() {
return SPARK_VERSION_SHORT.equals("3.2.0");
}
}
|
apache/usergrid | 1,084 | stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraCluster.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.usergrid.persistence.core.astyanax;
import com.netflix.astyanax.Keyspace;
import java.util.Map;
public interface CassandraCluster {
Map<String, Keyspace> getKeyspaces();
Keyspace getApplicationKeyspace();
Keyspace getLocksKeyspace();
}
|
apache/wicket | 1,123 | wicket-guice/src/test/java/org/apache/wicket/guice/EvilTestService.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.guice;
import com.google.inject.Inject;
// No default ctor or interface
public class EvilTestService
{
private final String id;
@Inject
public EvilTestService(String id, Integer value)
{
this.id = id;
}
public String getId()
{
return id;
}
}
|
apache/xmlgraphics-fop | 1,133 | fop-core/src/main/java/org/apache/fop/area/SideFloat.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.area;
public class SideFloat extends Block {
private static final long serialVersionUID = 2058594336594375047L;
public SideFloat() {
setAreaClass(Area.CLASS_SIDE_FLOAT);
addTrait(Trait.IS_REFERENCE_AREA, Boolean.TRUE);
setPositioning(Block.ABSOLUTE);
}
}
|
apache/zeppelin | 1,112 | zeppelin-interpreter/src/main/java/org/apache/zeppelin/tabledata/TableData.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.tabledata;
import java.util.Iterator;
/**
* Abstract representation of table data
*/
public interface TableData {
/**
* Get column definitions
* @return
*/
ColumnDef [] columns();
/**
* Get row iterator
* @param
* @return
*/
Iterator<Row> rows();
}
|
google-research/google-research | 1,124 | tempered_boosting/MemoryMonitor.java | import java.awt.*;
import javax.swing.*;
public class MemoryMonitor implements Debuggable {
public long freeMemory, totalMemory, maxMemory, memoryUsed;
public String memString;
public boolean stop;
public int iter;
public MemoryMonitor() {
memString = "";
stop = false;
iter = 0;
Thread thread =
new Thread() {
public void run() {
while (!stop) {
compute();
try {
Thread.sleep(2000);
} catch (Exception e) {
}
}
}
};
thread.start();
}
public void stop() {
stop = true;
}
public void compute() {
int rr, gg, pmemu, pmemm;
double fr;
freeMemory = Runtime.getRuntime().freeMemory();
totalMemory = Runtime.getRuntime().totalMemory();
maxMemory = Runtime.getRuntime().maxMemory();
memoryUsed = totalMemory - freeMemory;
pmemu = (int) (memoryUsed / (1024 * 1024));
pmemm = (int) (maxMemory / (1024 * 1024));
fr = (100.0 * (double) pmemu) / (double) pmemm;
memString = "[" + DF0.format(fr) + "% Mem]";
}
}
|
google/bindiff | 1,054 | java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/tabpanels/projecttabpanel/treenodepanels/renderers/comparators/IconComparator.java | // Copyright 2011-2024 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
//
// 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.
package com.google.security.zynamics.bindiff.gui.tabpanels.projecttabpanel.treenodepanels.renderers.comparators;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Comparator;
import javax.swing.Icon;
public class IconComparator implements Comparator<Icon> {
@Override
public int compare(final Icon o1, final Icon o2) {
checkNotNull(o1);
checkNotNull(o2);
return o1.toString().compareTo(o2.toString());
}
}
|
google/caliper | 1,126 | caliper-api/src/main/java/com/google/caliper/model/InstrumentType.java | /*
* Copyright (C) 2016 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.caliper.model;
/** Enumeration of the available types of instruments for running benchmarks. */
public enum InstrumentType {
/** Runtime microbenchmark instrument. */
RUNTIME_MICRO,
/** Runtime macrobenchmark instrument. */
RUNTIME_MACRO,
/** Runtime picobenchmark instrument. */
RUNTIME_PICO,
/** Allocation microbenchmark instrument. */
ALLOCATION_MICRO,
/** Allocation macrobenchmark instrument. */
ALLOCATION_MACRO,
/** Arbitrary measurement instrument. */
ARBITRARY_MEASUREMENT,
}
|
google/closure-templates | 1,099 | java/src/com/google/template/soy/plugin/javascript/restricted/JavaScriptPluginContext.java | /*
* Copyright 2018 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.template.soy.plugin.javascript.restricted;
/** The context for a {@link SoyJavaScriptSourceFunction}. */
public interface JavaScriptPluginContext {
/**
* A value that resolves to the direction at runtime. Will resolve to {@code -1} if the locale is
* RTL, or {@code 1} if the current locale is LTR.
*
* <p>Very few plugins should require this, instead rely on the built-in bidi functions and common
* localization libraries.
*/
JavaScriptValue getBidiDir();
}
|
google/depan | 1,122 | DepanCore/prod/src/com/google/devtools/depan/model/ElementTransformer.java | /*
* Copyright 2008 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.model;
/**
* An interface providing a way to transform an {@link Element} into any other
* type of objects. (used to give a color, shape, size, etc. to an Element)
*
* @author Yohann Coppel
*
* @param <R> type of the resulting transformation.
*/
public interface ElementTransformer<R> {
/**
* Give a corresponding R to the given Element.
* @param element {@link Element} to transform.
* @return corresponding objects.
*/
R transform(Element element);
}
|
google/error-prone | 1,115 | core/src/main/java/com/google/errorprone/refaster/annotation/NoAutoboxing.java | /*
* Copyright 2013 The Error Prone 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.errorprone.refaster.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Indicates that a Refaster rule should not allow autoboxing when it is typechecking a match.
*
* @author lowasser@google.com (Louis Wasserman)
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.SOURCE)
@RequiredAnnotation(BeforeTemplate.class)
public @interface NoAutoboxing {}
|
google/exposure-notifications-android | 1,077 | privateanalytics/src/main/java/com/google/android/libraries/privateanalytics/Qualifiers.java | /*
* Copyright 2020 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
*
* https://www.apache.org/licenses/LICENSE2.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.libraries.privateanalytics;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.inject.Qualifier;
public class Qualifiers {
@Qualifier
@Retention(RetentionPolicy.RUNTIME)
public @interface RemoteConfigUri {}
@Qualifier
@Retention(RetentionPolicy.RUNTIME)
public @interface PackageName {}
@Qualifier
@Retention(RetentionPolicy.RUNTIME)
public @interface BiweeklyMetricsUploadDay {}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.